I had a closer look at how the incremental directory backup is done here.
Code:
# If it's not the first day of the month we make incremental backup
if [ ! -e $tmpdir/full-backup$XX.lck ] ; then
log "Starting daily backup for: $YX"
NEWER="--newer $FDATE"
$TAR $NEWER $ARG $BACKUPDIR/$MDATE/i$XX-$FDATE.tar.bz2 $YX -X $tmpdir/excluded
log "Daily backup for $YX done."
else
log "Lock file for $YX full backup exists!"
fi
I think this could lead to problems if (for any reason) one incremental run did not work. You could be missing files in the archives then, as the --newer flag is date-based.
Wouldn't it be a good idea to use the incremental flag of tar?
So instead of using
Code:
$TAR $NEWER $ARG $BACKUPDIR/$MDATE/i$XX-$FDATE.tar.bz2 $YX -X $tmpdir/excluded
you could use
Code:
$TAR $ARG -g $BACKUPDIR/$MDATE/backup$XX.state $BACKUPDIR/$MDATE/i$XX-$FDATE.tar.bz2 $YX -X $tmpdir/excluded
Of course you would have to add the -g $BACKUPDIR/$MDATE/backup$XX.state to the full backup command, too.