Backup MYSQL Database’s in 1 Minute or Less.
Lets wrap this up, you are in an emergency and wish to quickly backup all your databases, you have no gui and are logged in via
ssh or in any of your terminal based session, no worries, run the following command as a
mysqldump --all-databases > all_db.sql
This command will backup all of your databases into a single file called
all_db.sql which you can now email, download or just move to
If you wish to backup a specific
database then run the following command
mysqldump your_database > your_database.sql
your_database with your database name and enter the command.
You can use the
unzip utility to zip the sql file and use
You can also backup specific databases separated by “,” and it will be saved in one single file. Forexample
mysqldump --databases your_first_db your_second_db your_third_db your_fourth_db > my_four_databases.sql
your_first_db and so on with your
databases names and the final file will be
my_four_databases.sql ofcourse filename is as per your choice.