Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Big Database backup best practice

I maintain big MySQL database. I need to backup it every night, but the DB is active all the time. There are queries from users. Now I just disable the website and then do a backup, but this is very bad as the service is disabled and users don't like this.

What is a good way to backup the data if data is changed during the backup?

What is best practice for this?

like image 266
Roman Gelembjuk Avatar asked May 08 '12 12:05

Roman Gelembjuk


People also ask

What are the best database backup best practices in SQL Server?

Identifying the backup and recovery requirements, setting up an automated backup schedule, and backup restoration testing are some of the best database backup practices you need to implement for successful backup and restore process in SQL Server. This article discusses five SQL Server database backup best practices worth exploring. 1.

How often should you back up your database?

If the service level is 15 minutes, then backups need to be done at least every 15 minutes. Again, for BLI backups, a 15-minute window is reasonable. The only negative to a high number of BLI backups is that there is a limit in most software applications as to how many BLI backups can exist prior to them impacting backup and recovery performance.

What is the best backup strategy for vldbs?

File or filegroup backup strategy can be used if the databases to be backed up are very large databases (VLDBs) that are partitioned among multiple files.

How to prepare a backup plan for a database?

1 Develop a comprehensive backup plan. 2 Perform effective backup management. 3 Perform periodic databases restore testing. 4 Have backup and recovery SLAs drafted and communicated to all stakeholders. 5 Have the disaster recovery plan (DRP) database portion drafted and documented. More items...


1 Answers

I've implemented this scheme using a read-only replication slave of my database server.

MySQL Database Replication is pretty easy to set up and monitor. You can set it up to get all changes made to your production database, then take it off-line nightly to make a backup.

The Replication Slave server can be brought up as read-only to ensure that no changes can be made to it directly.

There are other ways of doing this that don't require the replication slave, but in my experience that was a pretty solid way of solving this problem.

Here's a link to the docs on MySQL Replication.

like image 136
Kevin Bedell Avatar answered Sep 29 '22 10:09

Kevin Bedell