8/2/2011 ~ 1 min read

August Backup Steps


Remote Computer

  1. cd backups
  2. mkdir 2011.08
  3. mysqldump -u hippeele_wrd1 —password=“BOXCvP59vA” -h localhost hippeele_wrd1 | gzip -9 > 2011.08/2011.08.sql.gz
  4. tar -zcvf 2011.08/site-files.tar.gz ../public_html/
  5. tar -zcvf 2011.08.tar.gz 2011.08
  6. pwd -> /home7/hippeele/backups

Local Computer

  1. cd ~/src/hippeelee
  2. 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’


Headshot of Matthew Hippely

Hi, I’m Matthew. I live in Ventura County, and spend my time thinking about systems, software, and how things evolve over time.

You can find me on GitHub, LinkedIn, or read more about me here.