Need help with backup shell script
valerio.daelli at gmail.com
Wed Nov 21 08:13:32 PST 2007
> DATE=`date +%Y%m%d%H%M`
> mount /dev/da2 $MOUNT #Change device name
> find $MOUNT -mtime +30 -delete
> mkdir $MOUNT/$DATE
> cp -rp /backup/* $MOUNT/$DATE
> umount /external
Please substitute the line starting with 'cp' with this one:
rsync -rlpgoD /backup/ $MOUNT/$DATE
(you must portinstall rsync as well)
since 'cp -rp' preserve modification times as well while 'rsync -rlpgoD'
preserve permission but not mtime.
More information about the freebsd-questions