April 15th, 2004

megatokyo, largo, MT, manga, japanese

ph34r m4 r00tly p0w3rz!

NEW=`date +'%Y.%m.%d'`-full.tar.gz
OLD=`date --date='3 days ago' +'%Y.%m.%d'`-full.tar.gz

cd /usr/backup
rm $LCL
nice tar czf $LCL --exclude=/usr/backup/$LCL /lib /opt /root /usr \
/bin /home /sbin /var /boot /etc /initrd /sys /vmlinuz
chown root:brent $LCL
chmod 640 $LCL
nice smbclient //BRENT/BACKUP -U BRENT%<password> -W LAYOR -c "rm $OLD; put $LCL $NEW"
Too bad /usr is the only partition big enough to hold a compressed tarball of the entire drive. Now to figure out incremental backups...
  • Current Mood
    geeky geeky