How do I backup a MySQL database?

前端 未结 5 941
日久生厌
日久生厌 2021-01-03 05:42

What do I have to consider when backing up a database with millions of entries? Are there any tools (maybe bundled with the MySQL server) that I could use?

5条回答
  •  天命终不由人
    2021-01-03 05:44

    Mysqlhotcopy is badly described - it only works if you use MyISAM, and it's not hot.

    The problem with mysqldump is the time it takes to restore the backup (but it can be made hot if you have all InnoDB tables, see --single-transaction).

    I recommend using a hot backup tool, like what is available in XtraBackup: http://www.percona.com/docs/wiki/percona-xtrabackup:start

提交回复
热议问题