MySQL Backup Type

Source: Internet
Author: User

For DBAs, the most basic task is to back up and restore the database. In case of exceptions (such as server downtime or disk damage), the data department should be lost, or, the loss is minimized.

MySQL database provides many tools (such as mysqldump, ibbackup, and replication) that can be used to complete backup, and can also be completed using third-party tools, such as xtrabackup and LVM snapshot backup. DBAs should design a backup policy that minimizes losses and has minimal impact on the database according to their business requirements.

 

Backup and recovery:

Backup method:Hot Backup (Hot Standby)Cold backup(Cold backup)Warm backup(Warm backup)

Hot Backup: Direct backup during database operation, which has no impact on the running database. (Online backup) official manual for online backup

Cold backup: Offline backup refers to offline backup when the database is stopped.

Warm backup: Backup is also performed when the database is running, but it will affect the operation of the current database. For example, you can add a global read lock to ensure the consistency of the backup data.

 

Follow the backup file content:

Logical backup--> The content of the backup file is readable, usually text files. The content is generally an SQL statement or actual data in the table, such as mysqldump and select * into OUTFILE, it is generally applicable to database upgrades and migration, and recovery takes a long time

 

Raw file backup--> Copy the physical files of the database. The database can be in the running state (ibbackup, xtrabackup, or other tools), or in the stopped state. The recovery time is short.

 

The backup database can be divided:

Full backup: Complete database backup

Incremental Backup: Back up the updated data based on the last full backup (xtrbackup)

Log backup: Binary log backup, master-slave Replication

Excerpt from the author's book "MySQL technology insider-InnoDB Engine"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.