[Dirvish] More than on tree per backup?

Dave Howorth dhoworth at mrc-lmb.cam.ac.uk
Mon Feb 12 13:47:36 UTC 2007


Thanks to everybody for explaining how complicated the rsync args become
:)  Now I understand the motivation for the patch!

Kelsey Cummings wrote:
> On Sun, Feb 11, 2007 at 07:33:23AM +0000, Noel Kelly wrote:
>>> I do.  It only took a couple of minutes to hack into place what I think is
>>> a more expected way of defining backups.  Hackish, yes, but now I have a
>>> paths: option that, if present, overrides $srctree as derived from tree:
>> Kelsey - can you post the hack if it is not too involved?  I like the 
>> look of the path: parameter:
>>
>>> tree: / 
>>> paths: / /boot /var
> 
> No assurances it will work with all the features of dirvish but it would be
> easy to fix the rest.  Not sure why system wouldn't take @cmd directly but
> putting it back into a string and letting the shell deal with it was an
> easy fix.

You were trying to pass several arguments in one element of the @cmd
array. So then you have to invoke the shell to sort it out. With it's
theoretical security risk :(

You could just split the args, perhaps, or make the paths: option a list
option.  Or quote them, as the rsync manpage shows.

But if $rclient has a value (i.e. if it's a remote client) then the
whole patch will fail anyway, I think? Because $srctree is pasted into
the middle of a string. The whole expression looks like it needs reworking.

Cheers, Dave



More information about the Dirvish mailing list