Upload db backup not working

Website URL : arieszappini.com

Error Message : “#1046 - No database selected” and “phpMyAdmin - Error, Incorrect format parameter”

Hello, from days now I am trying to restore my backup of a Wordpress websites that I hosted with Bluehost to infinity free. The backup was made and sent in my mail by cPanel.
The backup came in tar.gz file format, it was 820MB of size.
I tried importing it in phpMyAdmin, but it said file size limit was 300mib and it didn’t work.
I then tried changing tho compression format to .zip, and it still didn’t work.
I then tried renaming my zip folder example.sql so that it would be the right .sql.zip format, but it still didn’t work.
So I removed some photos and videos from the backup files to reduce size and compressed again, I ended up with a 200mb zip file, that I but in a zip folder renamed with example.sql so that it would be the right .sql.zip for phpMyAdmin, but it still didn’t work, the error message was still “phpMyAdmin - Error, Incorrect format parameter”

I then saw some forum saying a database backup shouldn’t come under the .tar.gz extension in the first place so I tried so look for a .sql database file inside the .tar.gz folder uncompressed and found a exampleWPP9T.sql file.
I tried to import that file instead but still didn’t work, error message: “#1046 - No database selected”.

I don’t know what to do anymore to restore my website.

I’ll leave some screenshots of the problem and the files.

Please follow this guide

The reason for encountering this error is because your are using the wrong DB naming convention.
Please make sure DB is present in the first place

2 Likes

The backup you got is a “full account backup”. It contains EVERYTHING from your account: files, databases, emails, cPanel configuration, and everything else you could need to setup the account exactly as-is on another cPanel server.

However, we don’t use cPanel, so you cannot import this backup directly on our hosting. You can obtain the necessary data from it, but you’ll need to do some manual effort to untangle the backup and restore everything here.

phpMyAdmin can be used to restore a backup of an individual database. It can’t make sense of a cPanel full account backup.

To restore your databases, you’ll need to extract the cPanel backup on your own computer and obtain the backups of your database. Looking at a different cPanel backup, the backup should contain a directory mysql that contains files that look like <username>_<databaseName>.sql. You can find the file that matches the database of your site, and import it through phpMyAdmin.

3 Likes

Hello, thank you for your reply. I indeed found the <username>_<databaseName>.sql file in the mysql directory in the extracted backup, which you can see here:

However, when I try to upload that with the phpMyAdmin import tab I get this error:

As the database name has changed (Your InfinityFree database name is _<db_name>), you need to change that in the SQL document (It should be one of the first few lines)

5 Likes

I changed the database name in the SQL document in lines :
“-- Current Database: if0_35132920_ariess” (new name) and
“-- Host: localhost Database: if0_35132920_ariess”

it worked, uploaded it on phpMyAdmin with the successful message: " Import has been successfully finished, 314 queries executed. (arieszap_WPP9T.sql)"

thank you very much :slight_smile:

3 Likes

sorry for asking again, but how do I proceed now to import the files, wp settings, plugins?

You can upload the contents of your home directory (Probably within a folder called public_html or htdocs or www in your backup) to the htdocs folder on InfinityFree. I highly recommend you use a FTP client like FileZilla for this step.

6 Likes

Found the folder under the name public_html, trying to upload it the htdocs with Monsta FTP client because I don’t know how to install FileZilla on Infinity Free.
It kinda froze, I will let you know if I manage to upload it,
thanks again

Yeah, don’t use Monsta for this. Even if it fully uploads ‘correctly’, you might only get half of the file uploaded, or some files might be duplicated, etc.

FileZilla is not hard to learn at all, and there is a video tutorial at the end of this support article:

6 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.