Skip to:
Content
Pages
Categories
Search
Top
Bottom

Automated Backup Plugin?

  • 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?

Viewing 3 replies - 1 through 3 (of 3 total)

  • chrishajer
    Participant

    @chrishajer

    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.

    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.


    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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar