Installing DAR
- http://dar.linux.free.fr/
- http://dar.linux.free.fr/doc/mini-howto/dar-differential-backup-mini-howto.en.html
cd /root
ls
dar_backup.sh dar_diff.sh
cat dar_backup.sh
#!/bin/sh
DIR=/var/backups/system
FILE=${DIR}/`/bin/date -I`_data
# Commands
/usr/bin/dar -m 256 -y -s 600M -D -R / -c $FILE -Z "*.gz" \
-Z "*.bz2" -Z "*.zip" -Z "*.png" -P home -P tmp \
-P mnt -P dev -P proc -P floppy -P burner -P cdrom\
-P media -P var/backups > /dev/null
/usr/bin/dar -t $FILE > /dev/null
cat dar_diff.sh
#!/bin/sh
DIR=/var/backups/system
FILE=${DIR}/`/bin/date -I`_diff
PREV=`/bin/ls $DIR/*.dar|/usr/bin/tail -n 1`
/usr/bin/dar -m 256 -y -s 600M -D -R / -c $FILE -Z "*.gz" \
-Z "*.bz2" -Z "*.zip" -Z "*.png" -P home -P tmp \
-P mnt -P dev -P proc -P floppy -P burner -P cdrom\
-P media -P var/backups > /dev/null
-P var/backups -A ${PREV%%.*} > /dev/null
/usr/bin/dar -t $FILE > /dev/null
No comments:
Post a Comment