MySQL Database Hot Backup and cold backup

Source: Internet
Author: User
Cold backup occurs when the database is shut down normally. When the database is shut down normally, it will provide us with a complete database. Cold backup is one of the key files copied to another location.

Cold backup occurs when the database is shut down normally. When the database is shut down normally, it will provide us with a complete database. Cold backup is one of the key files copied to another location.

Cold backup (off, slow, point-in-time recovery)
Cold backup occurs when the database is shut down normally. When the database is shut down normally, it will provide us with a complete database. Cold backup is a way to copy key files to another location. Cold backup is the fastest and safest way to back up database information.

Advantages of cold backup:
1. It is a very fast backup method (just copy files)
2. Easy to archive (simple copy)
3. easy recovery to a certain point in time (you only need to copy the file back)
4. It can be combined with the archiving method to restore the database to the "latest State.
5. Low maintenance and high security.

Disadvantages of cold backup:
1. When used separately, only recovery at a certain time point can be provided.
2. During the entire backup process, the database must be backed up instead of other work. That is to say, in the cold backup process, the database must be closed.
3. If the disk space is limited, it can only be copied to tape and other external storage devices, and the speed will be very slow.
4. data cannot be restored by table or by user.
It is worth noting that cold backup must be performed when the database is closed. When the database is turned on, the execution of database file system backup is invalid. After restoration, you must change the database file owner to mysql.

Hot Backup (on, fast)
Hot Backup is the SQL statement used to back up the database when the database is running. When a database problem occurs, you can re-execute the SQL statement for backup.

Advantages of Hot Backup:
1. Data can be backed up at the tablespace or data file level. The backup time is short.
2. The database is still available during Backup.
3. It can be restored in seconds (to a specific point in time ).
4. Restore almost all database entities.
5. Recovery is fast, and recovery is usually performed when the database is still working.

Disadvantages of Hot Backup:
1. No error is allowed; otherwise, the consequences are serious.
2. If the Hot Backup fails, the result cannot be used for restoration at a time point.
3. Because it is difficult to maintain, be careful and do not allow "end with failure ".

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.