View Single Post
Old 14th May 2011, 11:14
Croydon Croydon is offline
ISPConfig Developer
Join Date: Jul 2007
Location: Koblenz, Germany
Posts: 932
Thanks: 16
Thanked 264 Times in 208 Posts

I had a closer look at how the incremental directory backup is done here.

	    # 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."
	    log "Lock file for $YX full backup exists!"
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
$TAR $NEWER $ARG $BACKUPDIR/$MDATE/i$XX-$FDATE.tar.bz2 $YX -X $tmpdir/excluded
you could use
$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.

Last edited by Croydon; 14th May 2011 at 11:17.
Reply With Quote