1. MySQL – Dump
mysqldump -h HOSTNAME -u USERNAME --password=PASSWORD DBNAME > dbdump.sql
Compress SQL Dump(Optional):
bzip2 dbdump.sql
2. MySQL – Restore
Decompress SQL Dump(Optional):
bzip2 -d dbdump.sql.bz2
mysql -h HOSTNAME -u USERNAME --password=PASSWORD DBNAME < dbdump.sql
Leave a Reply