upload backup sql

wissem

Member
hi!
I have a problem on my server and I decided to format it, so to keep my data I export the backup, after formatting I upload the file mailwizz, and I made the config but when I want to import the backup (sql file) it takes a long time without result how I can do
 

twisted1919

Administrator
Staff member
Hey,

Big files have to be imported from command line.
In order to do so, upload your sql file on the server, say in the /root folder.
Now let's assume your file is called backup.sql, in order to import it, you will run following command:
Code:
# change in the directory where the backup file is:
cd /root

# import the file:
mysql -u YOUR_DATABASE_USER -p YOUR_DATABASE_NAME < backup.sql

One you run the second command, you will be asked for a password for YOUR_DATABASE_USER, so insert that and wait for the import to complete, this can even take hours.

Thanks.
 
Top