MyBB Community Forums

Full Version: forum backup
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
i want to backup my forum (with all the messeges and users in). someone can tell me how do i do this?
the host is from bluehost for you know.
In ACP, go to "Tools & Maintenance" > "Database backups" and do a new backup. Download the generated file, it contains all the content of your forum.
Then, using an FTP client, download all the files in your forum directory.

Two tips:
1. It's better to temporaly close your forum if there is a lot off traffic
2. If you plan to migrate your forum to another server, disable all plugins (Board Settings » General Configuration) before backup
My host provides SSL access, so I created a script and a folder named database.

backup.sh script contains
mysqldump --no-tablespaces -h localhost -u username -ppassword databasename > ~/database/backup-$(date +%Y-%m-%d).sql

Setup a cron job, and I get a daily backup. I accept the risk of command line password because MySQL is served from the same server the site is running on. I can download the database backup for local storage.

The database can be installed the same way: from the command line with
mysql -h hostname -u username -p databasename < ~/database/backup-2021-01-18.sql

A backup saved using one method may give you problems restored using another method. I have never used the ACP backup because of my database size. I use the mysqldump/mysql method to install the database to another instance of mybb running for testing purposes.

You can make a one-time backup from the command line.
Messages and users in are in your database, so you can use the MyBB backup in ACP tools and maintenance.  But that won't back up files, which you need for attachments and custom files - like graphics, icons, etc.

From memory, MyBB's database backup doesn't add any drop table instruction, so need to consider that when performing any restore.  There's documentation for backup, which you can lookup on this site.  Myself, I use a scheduled management panel backup - which includes both database and files - as well as other things unrelated to MyBB.  Untarring the appropriate files gives me all I need for a local test system with live data.

I can restore my production board using the restore tools in the panel.  Or via cli access - if it comes to that.  The same would hold true for moving hosts/server, but as @CrazyCat says, I'd disable plugins first. You want to deal with any compatibility issues with the core system first.

cheers...