MySQL Backups 
//dump a database
mysqldump -u UserName -p --host=dev.barney.com db_name > db_name_backup.sql
//compressed dump
mysqldump -u UserName -p --host=dev.barney.com db_name | gzip > db_name_backup.sql


//restore database
mysql -u UserName -p target_db_name < db_name_backup.sql

//dump and restore
mysqldump -u UserName -p --host=dev.barney.com db_name | mysql -u UserName -p target_db_name



Comments
Comments are not available for this entry.
2025 By Angel Cool