/ Published in: Bash

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/bin/sh date=`date -I` day=`date +%d` bak=~/backup-$date.sql.gz mysqldump --user=root --password=PASSWORD --all-databases --opt --skip-add-locks | gzip > $bak ionice -c3 scp -q $bak tr0ycom:~/backups/linode/mysql ionice -c3 rm $bak export PASSPHRASE=PASSWORD if [ $day = 01 ] then ionice -c3 duplicity --full /home/ scp://tr0ycom/backups/linode/home ionice -c3 duplicity --remove-older-than 2M /home/ scp://tr0ycom/backups/linode/home else ionice -c3 duplicity /home/ scp://tr0ycom/backups/linode/home fi
Comments
