Posted By

troynt on 02/09/09


Tagged

duplicity


Versions (?)

Duplicity Backup


 / Published in: Bash
 

  1. #!/bin/sh
  2. date=`date -I`
  3. day=`date +%d`
  4. bak=~/backup-$date.sql.gz
  5. mysqldump --user=root --password=PASSWORD --all-databases --opt --skip-add-locks | gzip > $bak
  6. ionice -c3 scp -q $bak tr0ycom:~/backups/linode/mysql
  7. ionice -c3 rm $bak
  8.  
  9. export PASSPHRASE=PASSWORD
  10. if [ $day = 01 ]
  11. then
  12. ionice -c3 duplicity --full /home/ scp://tr0ycom/backups/linode/home
  13. ionice -c3 duplicity --remove-older-than 2M /home/ scp://tr0ycom/backups/linode/home
  14. else
  15. ionice -c3 duplicity /home/ scp://tr0ycom/backups/linode/home
  16. fi

Report this snippet  

You need to login to post a comment.