# - No .idx files.
# - No .snar-style incremental backups, only date-based.
# - No touching of .lastbackup for Nagios.
+# - Failed tar operations may go undetected, since we only see the error code
+# the last process in the pipe chain, which is gpg.
nonprivbackup()
{
infomsg "$computer:$filesystem $backuplevel non-privileged backup"
if [ "$backuplevel" = "daglig" ]; then
lastd=`cat ../.date`
- lastcmd="\"$lastd\""
+ lastcmd="'$lastd'"
else
lastcmd=""
fi
infomsg "Running $TARCMD"
eval $TARCMD > $TARFILE
- if [ $? -lt 2 ] && [ -s $TARFILE ]; then
- # File is >0 in size and the remote tar did not report any fatal errors; we assume it worked.
+ if [ $? -eq 0 ] && [ -s $TARFILE ]; then
+ # File is >0 in size and the remote side did not report any fatal errors; we assume it worked.
# Move tar file in place
mv $TARFILE $DATE.tgz.gpg