linux_wiki:backup_and_restore_a_database

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

linux_wiki:backup_and_restore_a_database [2016/09/11 14:51]
billdozor created
linux_wiki:backup_and_restore_a_database [2019/05/25 23:50]
Line 1: Line 1:
-====== Backup And Restore A Database ====== 
- 
-**General Information** 
- 
-Backing up and restoring a database. 
- 
----- 
- 
-====== Backup ====== 
- 
-Backup 1 specific database: Run the MySQL Dump utility to backup tables within a database 
-<code bash> 
-mysqldump -u root -p emails > /backup/emails_backup.sql 
-</code> 
-  * Builds SQL commands that will create the tables from scratch 
- 
-\\ 
-Backup multiple databases 
-<code bash> 
-mysqldump -u root -p --databases emails mysql > /backup/emails_mysql_backup.sql 
-</code> 
-  * --databases -> flag to backup multiple databases at once 
- 
-\\ 
-Backup all databases 
-<code bash> 
-mysqldump -u root -p --all-databases > /backup/all_dbs.sql 
-</code> 
- 
----- 
- 
-====== Restore ====== 
- 
- 
----- 
  
  • linux_wiki/backup_and_restore_a_database.txt
  • Last modified: 2019/05/25 23:50
  • (external edit)