Wordpress has a great plugin called wp-backup that allows you to schedule a nightly backup of your database. Is there something similar for bbPress? If not, how should I back up my data regularly?
bbPress support forums » Plugins
Automated Backup Plugin?
(4 posts)-
Posted 4 months ago #
-
Do you have access to a shell at your host? If so, you can do it pretty easily. If not, I don't know of an automatic backup plugin for bbPress.
Posted 4 months ago # -
Yeah, I have shell access...
I had a shell script before to back up my whole schema; but I just want to back up the bbpress schema now, not the wordpress schema.
Posted 4 months ago # -
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.bz2You 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.
Posted 4 months ago #
Reply
You must log in to post.