Brent Dax (brentdax) wrote,
Brent Dax
brentdax

  • Mood:

ph34r m4 r00tly p0w3rz!

#!/bin/bash
LCL=backup-full.tar.gz
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...
Subscribe

  • Paging madlori (and anyone who knows her)

    An interesting thing just happened on Facebook chat. Lori Summers [2:29:44] Got my message ? Brent Royal-Gordon [2:33:45] I did. Lori Summers…

  • guest post

    kate is the best better than the rest the best the best haikus about kate: kate's my favourite i want to lick her ballsack it would taste so…

  • Practice

    This December, I will have been practicing programming seriously for ten years. That will mark the tenth anniversary of me starting to learn Perl. I…

  • Post a new comment

    Error

    default userpic

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 0 comments