Chris Horn writes:

> I have been trouble getting BackupPC to do a proper tar incremental
> backup.  The problem seems to be with tar and the $incrDate format.
> my setup is all on localhost, with no SSH, or other remote access.
> 
> Here is some sample log output:
> 
>   -----  SNIPPET OF LOG -----
> 
> Contents of file /var/lib/backuppc/pc/localhost/XferLOG.93.z, modified 
> 2005-08-08\ 12:31:15
> 
> Running: /usr/bin/sudo /usr/local/bin/backuppc-tar -v -f - -C /bin --totals 
> --newer='2005-08-02 19:00:00' .
> Xfer PIDs are now 11565,11564
> /bin/tar: Substituting 1901-12-13 15:45:52 for unknown date format 
> `\'2005-08-02'
> /bin/tar: 19\:00\:00': Cannot stat: No such file or directory
> Total bytes written: 3164160 (3.1MiB, 2.1MiB/s)
> /bin/tar: Error exit delayed from previous errors
> Tar exited with error 512 () status
>    create   755       0/0           0 .
>    pool     755       0/0      625228 bash
>    pool     755       0/0           4 rbash
>    pool     755       0/0           4 sh
>    pool     755       0/0       13848 readlink
>    pool     755       0/0       11036 run-parts
>    pool     755       0/0        5620 tempfile
>    pool     755       0/0        5576 mktemp
>    pool     755       0/0       31404 chgrp
> 
>   -----  END SNIPPET OF LOG -----
> 
> As you can see, the tar command is confused by the date format.  Here I've 
> modified the $Conf{TarIncrArgs} to put the date in single quotes.  The 
> specific 
> modification I made was to make the define look like this:
> 
> $Conf{TarIncrArgs} = '--newer=\'$incrDate\' $fileList';

The quotes won't do the right thing because BackupPC doesn't
use a shell to execute these commands.

> This was because when I just used:
> 
> $Conf{TarIncrArgs} = '--newer=$incrDate $fileList';
> 
> The error log looked like something along these lines:
> 
> /bin/tar: Treating date `2005-08-02' as 2005-08-02 00:00:00 + 0 nanoseconds
> /bin/tar: 19\:00\:00: Cannot stat: No such file or directory
> 
> Which led me to believe that the tar command was treating the hour portion of 
> the date as a file argument.

Perhaps the issue is with /usr/local/bin/backuppc-tar.  Is this a
perl or shell script, or just a renamed gnu tar binary?

If it a shell script then it is probably re-breaking args at
whitespace.  If so, you need $incrDate+ instead of $incrDate.

Craig


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
BackupPC-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Reply via email to