Remote Computer
- cd backups
- mkdir 2011.08
- mysqldump -u hippeele_wrd1 —password=“BOXCvP59vA” -h localhost hippeele_wrd1 | gzip -9 > 2011.08/2011.08.sql.gz
- tar -zcvf 2011.08/site-files.tar.gz ../public_html/
- tar -zcvf 2011.08.tar.gz 2011.08
- pwd -> /home7/hippeele/backups
Local Computer
- cd ~/src/hippeelee
- scp hippeele@hippeelee.com:/home7/hippeele/backups/2011.08.tar.gz .
Thoughts for running this as a cron job:
- one can ssh hippeele@hippeelee.com ‘cd backups | mkdir 2011.08 | mysqldump | copy-and-compress-site-files | compress-backup-directory’ in theory
- froma bash script can I create variables for the remote commands and insert them into a singl ssh command that I run?
- Can I upload to google docs with backup?
- I already know the date 2011.08 do I just need to know its wp.sql and the site files.
THis might be close but I am getting errors: ssh hippeele@hippeelee.com ‘mkdir backups/2011.08 | tar -zcxf backups/2011.08/sitefiles.tar.gz public_html/ | mysqldump -u hippeele_wrd1 -h localhost —password=“BOXCvP59vA” hippeele_wrd1 | gzip -9 > backups/2011.08/2011.08.sql.gz | tar -cf backups/2011.08/sitefiles.tar.gz backups/2011.08/2011.08.sql.gz | gzip -c - > backups/2011.08.tar.gz’