Backup:
mysqldump --opt -u [uname] -p[pass] [dbname] [tablename] > [backupfile.sql]
Backup multiple databases:
$ mysqldump -u [uname] -p[pass] --databases [dbname1] [dbname2] ... > [backupfile.sql]Backup all databases
$ mysqldump -u [uname] -p[pass] --all-databases > [backupfile.sql]
Restore:
mysql -u [uname] -p[pass] [db_to_restore] < [backupfile.sql]
No comments:
Post a Comment