Search code examples
mysqldatabasebackupinnodb

How to manage large MySQL databases (backup)


We have a production MySQL database of about 320GB on disk.

We need to perform regular backups of the dataset but, either mysqldump or "copying table files" are taking hours to complete; moreover, both commands lock the database leading to an unusable website.

At the moment out tables are InnoDB and we have no replication, clustering, master&slave in place.

Is there any way we can perform daily backups without having to take down the website?


Solution

  • Option 1: Have you tried mysqldump --single-transaction? This does not lock the database server, if you only back up InnoDB tables.

    Option 2: Percona XtraBackup, but this software is not available for Windows.

    Option 3: Percona XtraBackup on Windows. Read this blog that describes a way to use Docker to run Percona XtraBackup on Windows: https://www.percona.com/blog/2017/03/20/running-percona-xtrabackup-windows-docker/

    Option 4: Create a replication slave.