| 9 | |
| 10 | == Backups == |
| 11 | |
| 12 | === Mysql === |
| 13 | |
| 14 | The gaia script for backing up the Mysql databases is /root/sbin/mysql_backup_daily.sh and it contains: |
| 15 | |
| 16 | {{{ |
| 17 | #!/bin/sh |
| 18 | BACKUP=/var/backups/mysql_backup.`date +%a`.sql.gz |
| 19 | /usr/local/bin/mysqldump -h localhost -u root -pXXX --all-databases | /usr/bin/gzip -c > $BACKUP |
| 20 | |
| 21 | # backup to the development server, kiwi.webarch.net see ~/.ssh/config |
| 22 | scp $BACKUP kiwi:new-live-data/var/backups/ |
| 23 | }}} |
| 24 | |
| 25 | And /root/.ssh/config contains: |
| 26 | |
| 27 | {{{ |
| 28 | Host kiwi |
| 29 | User live |
| 30 | Hostname kiwi.webarch.net |
| 31 | }}} |
| 32 | |
| 33 | And the backups are written to /home/live/new-live-data/var/backups on wiki.webarch.net |
| 34 | |