Created
January 20, 2010 13:10
-
-
Save sergejx/281827 to your computer and use it in GitHub Desktop.
Simple backups using rsync
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Simple backups based on article | |
# http://blog.interlinked.org/tutorials/rsync_time_machine.html | |
FILES=$HOME # What to backup | |
BACKUPS=/media/sklad/backups-`uname -n` # Where to store backups | |
# File .rsync-filter can be used to exclude/include some files | |
# Use `man 1 rsync` for more information | |
date=`date "+%Y-%m-%dT%H:%M:%S"` | |
rsync -aPF --link-dest=$BACKUPS/current $FILES $BACKUPS/back-$date | |
rm $BACKUPS/current | |
ln -s back-$date $BACKUPS/current |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment