Re:Let's Stop Talking About "Backups"
by diego on Monday December 14, 2009 @01:02PM
(#994626)
This is the incremental backup script I use on my Linux box at home, a quick-and-dirty imitation of what Time Machine does. Obviously $HOME/backup is a different physical disk. Feel free to improve on this.
Re:Let's Stop Talking About "Backups"
by Locke1689 on Monday December 14, 2009 @03:45PM
(#995045)
You should think about keeping an offsite backup if possible. A second disk won't necessarily help if your computer gets dropped in a pool, house catches on fire, etc.
--------
#!/bin/bash
HOME=
date=`date "+%Y-%m-%dT%H:%M:%S"`
rsync -aP --link-dest=$HOME/backup/current /home
$HOME/backup/back-$date
rsync -aP --link-dest=$HOME/backup/current /etc $HOME/backup/back-$date
rm $HOME/backup/current
ln -s back-$date $HOME/backup/current
#see if the disk is getting full
FREE=`df -lk|grep sdb1|awk -F" " '{print $5}'|awk -F"%" '{print $1}'`
#alert me if the backup disk is getting full.
T=80
if [ "$FREE" -gt "$T" ]
then
else fi