神刀安全网

Fast MySQL Backup and Restore – Sarfraz Ahmed

Sarfraz Ahmed   

May 29, 2016 06:57 PM

Backing up and restoring MySQL database is generally trivial task however when database is huge, it is really a pain to do so because of amount of time it takes to perform backup/restore operation with conventional tools like PHPMyAdmin or similar.

If you have SSH access to server, we can leverage built-in MySQL commands mysqldump and mysql respectively to backup and restore big database really fast.

To Backup Database:

mysqldump -uDB_USER_HERE -pDB_PASSWORD_HERE DATABASE_NAME_HERE > backup.sql

To Restore Database:

mysql -uDB_USER_HERE -pDB_PASSWORD_HERE DATABASE_NAME_HERE < backup.sql

Note:If you don’t have SSH access, you can use tools like MySQLDumper which does fairly good job but not as fast as mysqldump and mysql commands of course.

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » Fast MySQL Backup and Restore – Sarfraz Ahmed

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址