MyBB Community Forums

Full Version: Restoring cpanel database backup through Phpmyadmin - Error uploading User table
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I have a database I'm trying to upload. Had to change hosts.

Have tried many methods and while waiting for the host to contact me back, figured I'd post here also. Been awhile.

So I have several backups. A really new that seems to have failed while backing up and I've just now noticed. About 100 mb uncompressed.

I have an older about 750 mb uncompressed. Maybe 200mb of trash data that piled up in sessions.

Well I've tried several backups and I get stuck around the users database. trying to write it I get errors.

35 errors were found during analysis.

    Unexpected character. (near "[" at position 1816)
    Unexpected character. (near "]" at position 1820)
    Unexpected character. (near "[" at position 1851)
    Unexpected character. (near "]" at position 1856)
    Unexpected character. (near "" at position 2048)
    Variable name was expected. (near "?" at position 2896)
 Etc

Is the user table usually saved in an array format?
Or is this some kind of error created by the backup or maybe a compromised system of some kind.
Instead of 10k users it's like 8 lines with 10k user data on them.

I'm desperate to get this backup working. I thought I used 1 of these before. Maybe i didn't have to delete my user table before and re upload.
Everything else seems to upload/write fine in phpmyadmin + sql. Just can't get this user table to upload.
Can you screenshot how that's being displayed? I haven't seen that error in phpMyAdmin before. A backup should just be a series of SQL inserts so not sure what these errors would be referring to.
A backup should be restored using the same method that created it.
phpmyadmin does not create the same as mysqldump does not create the same as MyBB.
(2021-09-09, 11:09 AM)HLFadmin Wrote: [ -> ]A backup should be restored using the same method that created it.
phpmyadmin does not create the same as mysqldump does not create the same as MyBB.

A backup from the MyBB ACP can be restored using phpMyAdmin - MyBB doesn't even have a facility to import a backup that it created.
(2021-09-09, 10:37 AM)Matt Wrote: [ -> ]Can you screenshot how that's being displayed? I haven't seen that error in phpMyAdmin before. A backup should just be a series of SQL inserts so not sure what these errors would be referring to.

Yeah that's how i would suspect it also.

This is how the sql file looks

https://i.imgur.com/PV3Szv2.png

At first I thought maybe it didn't take a full backup and only 11 users were copied. but if you look at the length, it's actually quite long. Long enough to hold 10k users data I assume.

But when pasting that in sql just throws an error.

(2021-09-09, 11:09 AM)HLFadmin Wrote: [ -> ]A backup should be restored using the same method that created it.
phpmyadmin does not create the same as mysqldump does not create the same as MyBB.

I see, I'm honestly not sure if I'm messing with a mybb backup or a phpmyadmin backup now that you put it this way. I'm pretty sure I've only grabbed phpmyadmin/cpanel download links. but this brings up another question, where do the mybb backups go, and can I restore through mybb using it's native backup?

Edit:
Another screenshot from phpmyadmin point of view: https://i.imgur.com/m9TTPeC.png

I get javascript error pasting the code.
I'm sorry. I should have qualified my post.

Over the last 5 years, I have migrated my forum to different servers. I use mysqldump to backup my database daily. The 300MB file is saved on the server, and manually copied offsite through FTP. phpMyAdmin has a file size limit, even when compressed, which forces me to use this method.

At one point in the past on another server, I was able to specify a local folder on the server for importing a large backup and I tried to import a backup created with myBB. The import was not successful, although I don't remember the details why.

Matt is right. MyBB can create a backup, but not restore it. I made an assumption about a discarded method without verifying it could be done.

At least one server later, I will try to verify restoring a backup using myBB and phpmyadmin, although currently the import file size limit is currently too small.
(2021-09-10, 04:12 PM)HLFadmin Wrote: [ -> ]I'm sorry. I should have qualified my post.

Over the last 5 years, I have migrated my forum to different servers. I use mysqldump to backup my database daily. The 300MB file is saved on the server, and manually copied offsite through FTP. phpMyAdmin has a file size limit, even when compressed, which forces me to use this method.

At one point in the past on another server, I was able to specify a local folder on the server for importing a large backup and I tried to import a backup created with myBB. The import was not successful, although I don't remember the details why.

Matt is right. MyBB can create a backup, but not restore it. I made an assumption about a discarded method without verifying it could be done.

At least one server later, I will try to verify restoring a backup using myBB and phpmyadmin, although currently the import file size limit is currently too small.

Thanks for your reply. I think I will start using your technique. I've had the same host for 5 years and my site has grown exponentially so I wasn't as prepared as I thought to do a server move.
Phpmyadmin has a file size limit that is such a pain. I tried using mysqldumper on a db that I think was corrupted and had errors, so i think I will try to utilize it again.

Before I used mysqldump splitter and just split it into 50mb files and uploaded. Just not wanting to work now for some reason.

and then the issue with the user table being the longest array I've ever seen. Just not sure how to work backwards with it like that. Trying to find older backups that may have a regular user table.
The reason it's one long line is it's just a bulk insert, so inserts lots of rows in one query which is more efficient I think, and makes for significantly smaller backup files as it's not having to repeat the INSERT INTO syntax for every single row. It shouldn't make any difference to the effectiveness of the import though.