Page 1 of 1

How to backup database from the commandline?

Posted: Mon Nov 30, 2020 6:56 pm
by Jackk
Hello,
How to backup the database from the commandline?

Re: How to backup database from the commandline?

Posted: Mon Nov 30, 2020 7:12 pm
by Tommy
Hello Jackk,

Please use the below command for taking database backup

mysqldump database_name > database_name.sql

and also restore from backup use below command

mysql database_name < database_name.sql

Re: How to backup database from the commandline?

Posted: Tue Dec 01, 2020 6:24 am
by steve
Hello,

You have multiple options.. The above mentioned option is to take backup and restore the database from the commandline ( cli ). Additionally, you can take db backup using the phpmyadmin export database option, which is more convenient for normal users.