Ok, so this falls into the category of ‘ blogging-about-blogging ‘. However I plan on doing this once a month and I don’t want to think about it too much. Backing up a wordpress dbms from a pagodabox site.
- create pagodabox tunnel
- get pagodabox dbms username
- call mysqldump command
Create a pagodabox tunnel
First you need to tunnel the pagodabox db1 virtual-machines port to your local box.
$ pagoda -a tunnel -c # Component id example db1
Get the pagodabox username
Visit the pagodabox admin page to get the username and passoword for the pagodabox dbms running on the db1 virtual machine.
- Click on your db1 instance.
- Click on manage
- grab username and password
Call Mysqldump command
Once you have your ssh tunnel created, you should have a port  forwarded to your local machine. Now you simply need to call mysqldump like you would if the dbms was local.
$ mysqldump --add-drop-table -h 127.0.0.1 -P 3307 --user -p wp-db | bzip2 -c > blog_wp-db.bak.sql.bz2 Enter password:
That’s it your database is backed up.