Hi list,

An?bal Pacheco wrote on 27.11.2006 at 18:02:59 [[BackupPC-users] [Fwd: Re:  
error in "--newer" tar's parameter]]:
> ooops, i think reply-to goes to the list. sorry.

my fault, I didn't reply to the list in the first place. Let's see who's
harvesting the list archives for e-mail addresses ;-).

> Hmmmmmm ... does my $fileList must have that plus sign at the end too?

For correctness: yes.
While $incrDate seems to be guaranteed to contain a character requiring
shell quoting (i.e. the space), $fileList may not, depending on your
BackupFilesOnly and BackupFilesExclude. That means you might be able to get
away with an incorrect setting of $fileList, while $incrDate will always
give you problems if you add the '+' and shouldn't or vice versa.
Of course, there's no reason to knowingly use '$fileList' if it should be
'$fileList+' ;-). It's just that if you were wondering why '$fileList' works
for full backups,

> # remove extra shell escapes ($fileList+ etc.) that are
> # needed for remote backups but may break local ones
> $Conf{TarFullArgs} = '$fileList';
> $Conf{TarIncrArgs} = '--newer=$incrDate $fileList';

that not necessarily means it is strictly correct.

> and now I must comment the two sencond lines to get the defaults or add
> the plus sign to the variables. I'm correct?

Yes.

After a bit of experimenting with 'sudo' I need to correct myself though.
Not 'sudo' is the source of your problem but your wrapper script. 'sudo'
preserves its argument boundaries (i.e. does not split or recombine
arguments).

> >> Running: /usr/bin/sudo /root/bin/tarCreate -v -f - -C /etc --totals 
> >> --newer=2006-11-23 11:33:18 .

/root/bin/tarCreate probably does something along the lines of

        exec /some/path/tar $some_extra_args $*

You can EITHER use '$incrDate+' and '$fileList+' (actually, your $fileList is
'.' as seen above, so as long as it stays that way, it won't make any
difference whether you use '$fileList' or '$fileList+') OR change your script
to use "$@" instead of $* (if it's that simple ... and, of course, if it's
really a bourne shell script) such as

        exec /some/path/tar $some_extra_args "$@"

Note the quotes, and if you change the script, then don't use the '+' forms.

I hope that was not too confusing :).

Regards,
Holger

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
BackupPC-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Reply via email to