Backing up all mysql DB and restoring
Every time when I wanna Backup and Restore DB I have to google again and again. So here is very good tutorial for doing this saving time
http://www.webcheatsheet.com/SQL/mysql_backup_restore.php
In short:
1. backup all database compressed
mysqldump -u root -p --all-databases | gzip -9 > alldb_backup.sql.gz
2. restore all database + users
gunzip < [backupfile.sql.gz] | mysql -u [uname] -p[pass] [dbname]
http://www.webcheatsheet.com/SQL/mysql_backup_restore.php
In short:
1. backup all database compressed
mysqldump -u root -p --all-databases | gzip -9 > alldb_backup.sql.gz
2. restore all database + users
gunzip < [backupfile.sql.gz] | mysql -u [uname] -p[pass] [dbname]
Comments
Post a Comment