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

How to use Xtrabackup, a backup tool for innodb storage engine

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

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces how to use innodb storage engine backup tool Xtrabackup. The article is very detailed and has certain reference value. Interested friends must read it!

One backup tool to start with is ibbackup, which companies rarely use anymore. (Charge, similar to xtrabackup function)

Xtrabackup is a tool for backing up InnoDB data, supports online hot backup (backup does not affect data reading and writing), and is a good alternative to commercial backup tool InnoDB Hotbackup.

Xtrabackup has two main tools: xtrabackup and innobackup.

(1) xtrabackup can only backup InnoDB and XtraDB data tables, but not MyISAM data tables.

(2) innobackupex-1.5.1 encapsulates xtrabackup, which is a script encapsulation, so innodb and myisam can be backed up at the same time, but a read lock is needed when processing myisam.

https://www.percona.com/downloads/XtraBackup/LATEST/

Support for version 5.7 and version 2.4.1

First create a separate backup user (use the client user in the profile if not configured):

create user 'bkpuser'@'localhost' identified by 'oracle';

grant reload,lock tables,replication client on *.* to 'bkpuser'@'localhost';

flush privileges;

You can see that undo and shared tablespaces are backed up, mysqldump's consistent backup is the data at the beginning of the backup, and xtrabackup's consistent backup is the point at which it ends.

When IBD is done, flush tables with read lock is also done.

xtrabackup also supports compression. we use xbstream compression

./ innobackupex --user=bkpuser --password=oracle --socket=/tmp/mysql.sock --compress --compress-threads=8 --stream=xbstream --parallel=4 ./ > backup.xbstream

There is also a very important information is the problem of xtrabackup selection. Your database version should be consistent with the large version of xtrabackup compiled based on mysql, so as to reduce the existence of problems.

The above is "innodb storage engine backup tool Xtrabackup how to use" all the content of this article, thank you for reading! Hope to share the content to help everyone, more relevant knowledge, welcome to pay attention to the industry information channel!

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