• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Restore backup via phpmyadmin

Daniele1

New Pleskian
Hello,
I made a backup of my website with plesk backup manager on an external FTP, now I want to restore this backup on a new server which isn't using plesk, for test purposes. I've downloaded the backup (which is in .tar) on my PC, and extracted all files firstly from the general .tar archive, then the user_data from .tgz. Then to extract all the databases (they were in a folder "databases" after I've extracted the general .tar file), I extracted them from database_name_145536536.tgz, then from database_name_145536536.tar, so that now I've a series of "database_name_145536536" files. (145536536 are some example numbers).

I'm interested in restoring both files and mysql databases.

Can you tell me if this process is correct?

To restore the files, I can simply use the extracted files from the user_data archive.
To restore the mysql databases, I tried to do "mysql -p -u username database_name < file" and everything seemed to work fine.

Is this process ok?
Is it 100% safe and sure or I could face some bugs?
 
Last edited:
I've updated the first post with new informations which may help you in understanding my situation. Please, can you help me? It's an urgent thing. Thank you.
 
To accomplish your goal of restoring the files and the database to a third party non-Plesk environment, you've got the right idea:

1 - Extract the files and re-upload those to your new test site (barring any strange issues with unsupported file names etc... you should be fine and shouldn't expect to have problems)
2 - When it comes to your database, you can extract it and use a tool like phpMyAdmin to import it into a clean database if completing it through a command line isn't something that you want to do (this shouldn't result in any issues either)
3 - Update any MySQL connection strings since your site files may try to connect to the old database instead of the one running in your test environment

Since it's a new environment and not your live site, why don't you try these steps first and see if you run into a problem as it shouldn't affect your site (just make sure to update your database strings once you import the database and upload the files).
 
hello @pleskpanel, first of all thank you so much for your help.

I've a doubt about the MySQL backup: Is it normal that it isn't in a .sql format, but it has no extension? Another question: When I extract plesk backup database .tgz from my server with command line I get immediately the database file. When I extract them on my PC with 7zip I've a .tar file, then the database.
 
Last edited:
Hi Daniele1,

first of all, please be aware, that the extension "sql" is not related to any software or application, it is nothing more than a file ( compare it with a TXT - file ), in where commands are stored. If you have "no extension" or an ".sql" - extension is not relevant for the storage of these commands - but if you insist, that a backup should always have an extension like ".sql", just rename it this way after extraction.

Depending on your software a ".tgz" file can either be extracted to the "gz" ( gzip ) in the first place and decompressed afterwards to the containing folders/files, or both steps are done in one go. Be aware that a "tarball archiv" ( tgz ) is first compressed and afterwards packed to an archiv. Please use Google with the search string "tgz" "file" to find a more exact definition and have as well a look at the differrent ways to extract/decompress such a file.
 
To follow on UFHH01's answer, if you want to check on the contents of the backup, once you unzip it (you mentioned you saw the tar file which contained the database), move the database file to your desktop and then open it with notepad (assuming that you are using Windows) at which point you should see the SQL insert statements.

As a further "quick" test, you can always create a second empty MySQL database in plesk, import the unzipped file, and as UFHH01 noted, the insert commands will be run, populating your database with tables (and hopefully the actual data).
 
Back
Top