CyberPanel Community

Database Backup Issue from phpmyadmin

8 replies
Mi
Mikr #2

I have the same problem…

Dr
Dreamer #3

You need adjust upload limit on database section for PHP 7.4 and reboot PHP

ra
rashedit #4

already did it.

JA
Joabe Arruda #5

Hello how are you?

This is probably some limitation on the host/server or setting “max_size” limits for uploading and downloading.

As I do not know what problem can indeed be, I leave here below the best option to export professionally, “back up” database of any size:

1. Get the privileges:

Access your terminal via SSH with root

2. Create the backups folder and access the path:

$ cd /home && mkdir db-backups && cd db-backups

3. Export your database:

$ mysqldump -u [user name] -p [db-name] > backup-my-db.sql

4. Confirms access:

Enter the database password and wait for the export to complete.

5. Finally, simply access your files through SFTP

in /home/db-backups/ and download your database. :slight_smile:


This is the best way for you to back up. Of course, using specific parameters to achieve even more detail with mysqldump, even make remote backups, multiple db at the same time, specific tables etc…

But the basics to use in Cyberpanel is described above.

ra
rashedit #6

how to import my database?

JA
Joabe Arruda #8

In the same way that you exported, it will change only the command.

1. First upload the database file to the server, via sftp/ftp.

For example, put in:

/home/db-backups/

Check:

$ cd /home/db-backups/ && ls

Confirm that the database has been loaded successfully.

eg: my-db.sql

2. If the database appears listed, then run:

$ mysql -h localhost -u [DATABASE-USER] -p [DATABASE-NAME] < my-db.sql

Then enter the database password

PS:

The database that will receive the import, must be empty!

Once this is done, the import will complete successfully. :slight_smile:

JA
Joabe Arruda #9

Sign in to reply