Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Introduction to Percona XtraBackup backup process

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The backup process can be illustrated with the following figure:

After innobackupex starts, it will first fork a process, start the xtrabackup process, and then wait for xtrabackup to back up the ibd data files.

When xtrabackup backs up InnoDB-related data, there are two threads, one is the redo copy thread, which is responsible for copying redo files, and the other is the ibd copy thread, which is responsible for copying ibd files. There is only one redo copy thread, which starts before the ibd copy thread and ends after the ibd thread ends. After the xtrabackup process starts execution, start the redo copy thread to copy the redo logs sequentially from the latest checkpoint point, and then start the ibd data copy thread, where the innobackupex process has been waiting (waiting for the file to be created) during the xtrabackup copy ibd process.

After the xtrabackup copy completes the idb, notify the innobackupex (by creating the file) while entering and waiting (the redo thread still continues to copy).

When innobackupex receives the xtrabackup notification, it executes FLUSH TABLES WITH READ LOCK (FTWRL), obtains the consistency point, and then starts backing up non-InnoDB files (including frm, MYD, MYI, CSV, opt, par, and so on). In the process of copying non-InnoDB files, because the database is global read-only, you should be especially careful if you back up the main database of the business. If there are more non-InnoDB tables (mainly MyISAM), the read-only time of the entire database will be longer, and this impact must be evaluated.

When innobackupex has copied all the non-InnoDB table files, notify xtrabackup (by deleting the file) and enter and wait (wait for another file to be created)

When xtrabackup receives a non-InnoDB notification from innobackupex backup, it stops the redo copy thread and then notifies innobackupex redo log that the copy is complete (by creating a file)

After receiving the notification of the completion of the redo backup, innobackupex begins to unlock and execute UNLOCK TABLES

Finally, the innobackupex and xtrabackup processes respectively complete the finishing work, such as releasing resources, writing backup metadata information, and so on. Innobackupex waits for the xtrabackup child process to finish and then exits.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report