mysql foundation of the basics of backup and recovery

The ultimate goal is to back up your data in the event of unforeseen circumstances, this can restore the data from backup, so only the backup data is often unable to meet the demand during the restore, so when backing up the database, in addition to backing up data itself, but also relevant information related to the backup database environment, such as configuration files, regular tasks, sudo permissions and so on.

First, why should back up?

  1, disaster recovery: hardware failure, software failure, natural disasters, hacker attacks, misuse

  2, the test

Second, the backup points to note

  1, how much time (the length of the backup process) backup requires
  2 can tolerate up to lose much data
  3, recovery data required to complete (the length of the recovery process) within a multi-field period
  4, what data needs to be recovered
  (1) do restore tests, the availability of backup for testing
  (2) reducing exercise

  5, the backup load

Third, the backup content (what backup?)

  1, data

  2, the binary log, innodb transaction logs

  3, the code (stored procedures, stored function, trigger, a scheduler time)

  4, the server's configuration file

 Fourth, the terminology related to backup

  1, full backup (full backup) (Full Backup)

  All the data for a point in time a full backup is performed, all data corresponding to the point in time are included in the full backup. (Backup the entire data set)

  2, partial backup

  Only a subset of data backup

  3, incremental backups

  Data (if incremental) backup only changes since the last full or incremental backup

  4, differential backup

  It backs up only the data since the last full backup changing;

  5, Hot Standby

  Read and write operations can be executed (often relies on transaction log) (maximum difficulty)

  6, preparation temperature

  Can read, write, not

  7, cold standby

  (File copy can be stopped after the database) can not read and write operations are performed

  8, physical backup

  Directly copy the data files are backed up, regardless of the storage engine (cp)

  9, logical backup

  From the database "Export" and save the data to back up

 

Guess you like

Origin www.cnblogs.com/renyz/p/11482249.html