I use a simple script to create incremental backups with rsync from my local linux station (XFS file system) to an external HD (NTFS file system) attached to it:
#!/bin/sh TIMESTAMP=`date "+%Y-%m-%dT%H-%M-%S"` USER=USER1 SOURCEDIR=/data TARGETDIR=/run/media/sbembenek/easystore1 # Create new backup using rsync and output to log rsync -avPh --delete --link-dest=$TARGETDIR/$USER-Current $SOURCEDIR/$USER/ $TARGETDIR/$USER-$TIMESTAMP > /archive/Backup-Logs/$USER-$TIMESTAMP.log 2>&1 # check exit status to see if backup failed if [ "$?" = 0 ]; then # Remove link to current backup rm -f $TARGETDIR/$USER-Current # Create link to the newest backup ln -s $TARGETDIR/$USER-$TIMESTAMP $TARGETDIR/$USER-Current else # Rename directory if failed mv $TARGETDIR/$USER-$TIMESTAMP $TARGETDIR/failed-$USER-$TIMESTAMP fi
I checked the resulting backup directories created in this way using 'du -h -d1'. I find that the first backup directory created is indeed the biggest and the ones thereafter are smaller, however, the subsequent directories are all about the same size. That is to say, I never find a latter directory to be substantially smaller than than a previous one, even if 'essentially' no files have changed between them. Based on the sizes I am seeing the backups seem more differential (versus the very first backup) than incremental.
Even worse, for my other set of backups, each of the backup directories is the same as the initial backup. What am I missing?