Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Automated Backup Plugin?


chrishajer
Participant

@chrishajer

It’s great that you have shell access. You can backup all the files with something like rsync, and you can use a shell script to backup the database tables you want. Since there are no wildcards in mysqldump, you will need to explicitly name all the tables in your installation; just separate them with spaces.

You can put something like this into a bash script and run it daily (or whenever) from cron:

mysqldump --add-drop-table -h host -u user -p password dbname 
( bb_forums
bb_meta
bb_posts
bb_tagged
bb_tags
bb_terms
bb_term_relationships
bb_term_taxonomy
bb_topics
bb_topicmeta
bb_users
bb_usermeta ) | bzip2 -c | bbpress.bak.sql.bz2

 

You would have to consider putting the password into the script and hiding that from prying eyes. Alternatively, you could create a user with limited privileges and no password, and use that in the backup script.

You should also verify the table prefix, and that those are all your bbPress tables. I think there are different tables for different bbPress versions.

Good luck.

Skip to toolbar