XF 2.1 How to backup just users and threads/comments/posts?

entelechy

Active member
If I want to just backup the current members of a forum, as well as the posts and threads (all user created content), so that I can revert to a site-wide backup from a few days ago, and then revert to the current state of all user-generated content and members on the site, is it just a case of exporting a few mysql tables to dropbox etc, restoring the sitewide backup, then reimporting the tables?

Would it be best to just do a full db backup, or for specific tables? Does it even matter?

If tables, which ones?

Thanks so much for any help with this!
 
If anyone can even just advise on whether backing up the whole database is a good idea, or whether I should just backup certain tables that would be a huge help.

I've just purchased an addon for database backups, and it looks like it only backs up the whole database - so even knowing if that is enough would be great.
 
For anyone looking for a proper answer to this question if they're stuck in the future and stumble across this, this is the solution that I just used:

I'm using DigitalOcean's snapshots to backup the entire vps, but in order to be able to restore a previous backup of the vps and then still have the threads, comment and users that had been created since the last sitewide backup you have to:

1. Get into the command line of the vps/server and use the command "sudo su" to become the super user.
2. Use the command "mysqldump -u <username> -p <dbname> > <filename>.sql" to create a backup of your database. (add password on prompt)
3. Use something like FileZilla to copy that locally.
4. Restore your sitewide backup.
5. Use FileZilla again to upload the .sql file back into your vps/server.
6. Use the command "sudo su" to become the super user.
7. Use the command "mysql -u <username> -p <dbname> < <filename>.sql" to replace your older database with the newer stored version. (add password on prompt)

You should now have the older version of your forum from the backup, except that now it will have the current version of all of your user-generated content and users.

I hope this helps someone in a similar situation - it can be pretty damn hard sometimes to get the information that you need.
 
Back
Top Bottom