bruker selv ett rsync skript.
Kode
#!/bin/sh
# Run the script in destination directory,
# it will sync source in a new dir into dest.
# Start backup of drive 2 (NTFS)
EXCLUDES=exclude.list
touch $EXCLUDES
#SRC=$HOME
SRC=/media/sdb1
DT=`date`
LOG=/tmp/externalbackup.${DT}.log
# -- Uncomment this line when you know what you do -
# This will delete the files you've been delete on the source as well.
DO_DELETE="--delete --delete-excluded"
echo "Starting backup of $SRC at $DT. "
rsync -Xavv $DO_DELETE \
--exclude-from="$EXCLUDES" \
$SRC . > $LOG
DT=`date`
echo "Done at" $DT
exclude.list:
*/import/*
*/tmp/*
*/src/*
*/.bochs/*
*/.gnome/*
*/.mozilla/*/Cache/*
*/.mldonkey/*
*/.aMule/*
*/.gconf/*
Sist endret av cspace; 6. desember 2008 kl. 23:56.