MyBB Community Forums

Full Version: Alternative way to backup data and structure?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
We're trying to move the forum to a different server but on the same host. We are however having trouble exporting a complete backup.

Unfortunately the backup function of the Administrative Control Panel of the forum has not worked for a long time.

If we use the backup function of our host we do not get a real time backup but a backup that was created x hours ago.

When we use Export on phpMyAdmin, we get all the tables but not the posts.

How can we export a complete backup with both structure (tables I presume) and data (posts I presume)?
If the backup of the host is complete and the only problem is it being "x hours ago"... find out which time of day they create the backups, then put the forum in maintenance mode an hour before that (so no more changes can be made) and move the forum the moment the backup is available.

Quote:Unfortunately the backup function of the Administrative Control Panel of the forum has not worked for a long time.

Which version of MyBB are you using and how doesn't the ACP backup work? What's the error message etc.?

The ACP also lets you backup each table individually so if it struggles to backup all tables at once, you can try making a separate backup just for the posts table, privatemessages table, (those two are likely the largest ones depending on user activity) and then everything else.
(2018-09-12, 08:23 AM)frostschutz Wrote: [ -> ]If the backup of the host is complete and the only problem is it being "x hours ago"... find out which time of day they create the backups, then put the forum in maintenance mode an hour before that (so no more changes can be made) and move the forum the moment the backup is available.

I'll try that.

Quote:Which version of MyBB are you using and how doesn't the ACP backup work? What's the error message etc.?

1.8.17

Error message when trying to make a complete backup with ACP:

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
2006 - MySQL server has gone away
Query:
SHOW FULL TABLES FROM databasename_forum WHERE table_type = 'BASE TABLE' AND Tables_in_databasename_forum = 'mybb_privatemessages'

Quote:The ACP also lets you backup each table individually so if it struggles to backup all tables at once, you can try making a separate backup just for the posts table, privatemessages table, (those two are likely the largest ones depending on user activity) and then everything else.

This is the error message I got when I tried to backup the posts table separately:

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
2006 - MySQL server has gone away
Query:
INSERT INTO mybb_adminlog (uid,ipaddress,dateline,module,action,data) VALUES (1,X'55e107c1',1536741069,'tools-backupdb','backup','a:2:{i:0;s:4:\"disk\";i:1;s:97:\"/home3/databasename/public_html/forum/_______/backups/backup___________.sql.gz\";}')
Well, "MySQL server has gone away" can unfortunately happen for a number of reasons (like an actual problem with the sql server, or a query / execution time limit, or ...) so basically you have to check logs (if you even have access to them) or ask the host if it's possible to give more generous limits for you to be able to move.

That said if it only happens for the adminlog insert, I think that only happens after the file was successfully created... so is it there or not?

(By the way, you should never publish backup filenames or anyone can download them unless you have additional protection in place. So if you have a file backup__20180912_033109_... make sure to rename / delete it asap)
Thanks, our host helped us create a real time backup, so the move of the website has been successful. We may look into using the backup function of the ACP again later, but for now we're good.

Thanks again!