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

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.

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