Graham, Your script is the problem. Using $* causes the shell the resplit arguments at whitespace. To preserve the arguments you need to put that in quotes:
exec /bin/tar -c "$*" Craig On Sat, Apr 25, 2020 at 5:04 AM Graham Seaman <gra...@theseamans.net> wrote: > Thanks Craig > > That's clearly the problem, but I'm still mystified. > > I have backuppc running on my home server; the storage is on a NAS NFS > mounted on the home server. Backing up other hosts on my network (both > full and incremental) over rsync works fine. > > The home server backs up using tar. The command in the log is: > > Running: /usr/bin/sudo /etc/backuppc/localtar/tar_create.sh -v -f - -C > /etc --totals --newer=2020-04-22 21:18:10 . > > If I set > > $Conf{TarIncrArgs} = '--newer=$incrDate+ $fileList+'; > > > then incremental backups of the home server fail with: > > /bin/tar: Substituting -9223372036854775807 for unknown date format > ‘2020-04-22\\’ > /bin/tar: 21\:18\:10: Cannot stat: No such file or directory > > If instead I set: > > $Conf{TarIncrArgs} = '--newer=$incrDate $fileList'; > > then incremental backups fail with: > > /bin/tar: Option --after-date: Treating date '2020-04-22' as 2020-04-22 > 00:00:00 > /bin/tar: 21\:18\:10: Cannot stat: No such file or directory > > Could it be to do with my localtar/tar_create.sh? (I created this so > long ago I no longer remember where it came from). > > This is just: > > #!/bin/sh -f > exec /bin/tar -c $* > > Thanks again > > Graham > > On 25/04/2020 02:59, Craig Barratt via BackupPC-users wrote: > > Graham, > > > > This is a problem with shell (likely ssh) escaping of arguments that > > contain a space. > > > > For incremental backups a timestamp is passed as an argument to tar > > running on the client. The argument should be a date and time, eg: > > > > --after-date 2020-04-22\ 21:18:10' > > > > Notice there needs to be a backslash before the space, so it is part of > > a single argument, not two separate arguments. > > > > You can tell BackupPC to escape an argument (to protect it from passing > > via ssh) by adding a "+" to the end of the argument name, eg: > > > > $Conf{TarIncrArgs} = '--newer=$incrDate+ $fileList+'; > > > > > > Craig > > > > On Fri, Apr 24, 2020 at 3:17 PM Graham Seaman <gra...@theseamans.net > > <mailto:gra...@theseamans.net>> wrote: > > > > > > > > > > > > > > > > > > Ok, I guess its this (from the start of XferLOG.bad): > > > > /bin/tar: Option --after-date: Treating date '2020-04-22' as > 2020-04-22 > > 00:00:00 > > /bin/tar: 21\:18\:10: Cannot stat: No such file or directory > > > > which is kind of confusing, as it goes on to copy the rest of the > > directory and then says '0 Errors'. Anyway, its correct that there > is no > > file called '21:18:10'. Any idea why it thinks there should be? > > > > Graham > > > > > > On 24/04/2020 20:59, Craig Barratt via BackupPC-users wrote: > > > Graham, > > > > > > Tar exit status of 512 means it encountered some sort of error > > (eg, file > > > read error) while it was running on the target client. Please > look at > > > the XferLOG.bad file carefully to see the specific error from tar. > > > > > > If you are unable to see the error, please send me the entire > > > XferLOG.bad file? > > > > > > Craig > > > > > > On Fri, Apr 24, 2020 at 12:13 PM Graham Seaman > > <gra...@theseamans.net <mailto:gra...@theseamans.net> > > > <mailto:gra...@theseamans.net <mailto:gra...@theseamans.net>>> > wrote: > > > > > > I have a persistent problem with backing up one host: I can do > > a full > > > backup, but an incremental backup fails on trying to transfer > > the first > > > directory: > > > > > > tarExtract: Done: 0 errors, 2 filesExist, 81381 sizeExist, > 18122 > > > sizeExistComp, 2 filesTotal, 81381 sizeTotal > > > Got fatal error during xfer (Tar exited with error 512 () > status) > > > Backup aborted (Tar exited with error 512 () status) > > > > > > All other hosts work ok. So I'm guessing it must be a file > > permission > > > error. Looking at the files, everything seems to be owned by > > > backuppc.backuppc, so I don't know where/what else to look > > for. Any > > > suggestions? > > > > > > Thanks > > > Graham > > > > > > > > > _______________________________________________ > > > BackupPC-users mailing list > > > BackupPC-users@lists.sourceforge.net > > <mailto:BackupPC-users@lists.sourceforge.net> > > > <mailto:BackupPC-users@lists.sourceforge.net > > <mailto:BackupPC-users@lists.sourceforge.net>> > > > List: > > https://lists.sourceforge.net/lists/listinfo/backuppc-users > > > Wiki: http://backuppc.wiki.sourceforge.net > > > Project: http://backuppc.sourceforge.net/ > > > > > > > > > > > > _______________________________________________ > > > BackupPC-users mailing list > > > BackupPC-users@lists.sourceforge.net > > <mailto:BackupPC-users@lists.sourceforge.net> > > > List: > https://lists.sourceforge.net/lists/listinfo/backuppc-users > > > Wiki: http://backuppc.wiki.sourceforge.net > > > Project: http://backuppc.sourceforge.net/ > > > > > > > > > _______________________________________________ > > BackupPC-users mailing list > > BackupPC-users@lists.sourceforge.net > > <mailto:BackupPC-users@lists.sourceforge.net> > > List: https://lists.sourceforge.net/lists/listinfo/backuppc-users > > Wiki: http://backuppc.wiki.sourceforge.net > > Project: http://backuppc.sourceforge.net/ > > > > > > > > _______________________________________________ > > BackupPC-users mailing list > > BackupPC-users@lists.sourceforge.net > > List: https://lists.sourceforge.net/lists/listinfo/backuppc-users > > Wiki: http://backuppc.wiki.sourceforge.net > > Project: http://backuppc.sourceforge.net/ > > > > > _______________________________________________ > BackupPC-users mailing list > BackupPC-users@lists.sourceforge.net > List: https://lists.sourceforge.net/lists/listinfo/backuppc-users > Wiki: http://backuppc.wiki.sourceforge.net > Project: http://backuppc.sourceforge.net/ >
_______________________________________________ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List: https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki: http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/