Updated December 17, 2003
Created December 17, 2003
Autogenerated Site Map
Search this Site!:
There is a cool way of backing up in Linux which involves hard linking to the previous day's backup. This way you can snapshot your whole system daily and the only extra amount of backup space used is anything that changes from the previous day.
The short example is:
rsync -a --relative --link-dest=$BACKUPDIR/$LAST /var/ftp/pub /var/mystuff $BACKUPDIR/$DATE
The script I'm currently using is:
BACKUPDIR=/root/backups/ro
mkdir -p $BACKUPDIR
DATE=`date +%Y%m%d`
LAST=`ls $BACKUPDIR | grep "^[0-9][0-9]*$" | sort | tail -1`
if [ -n "$LAST" ]; then
rsync -a --relative --link-dest=../$LAST `find /tftpboot ! -type d | grep -v img$` /var/ftp/pub/scripts /var/ftp/pub/kickstart /var/ftp/pub/testing $BACKUPDIR/$DATE
else
rsync -a --relative `find /tftpboot ! -type d | grep -v img$` /var/ftp/pub/scripts /var/ftp/pub/kickstart /var/ftp/pub/testing $BACKUPDIR/$DATE
fi
and the web site which contains the full detailed instructions is here:
http://www.mikerubel.org/computers/rsync_snapshots/
Search this Site!:
Homepage: http://www.cpqlinux.com
Site Map: http://www.cpqlinux.com/sitemap.html