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

Xtrabackup parameter supplement

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

I. description of some commonly used parameters in innobackupex

Click (here) to collapse or open

-u,-- user=name

-H-- host=name

-P,-- port=#

-p,-- password=name

-S,-- socket=name # socket directory

-- no-timestamp # cancels the automatic creation of timestamp directories

-- incremental # incremental backup

-- databases=name # specify the database name

-- use-memory=2G # specify the required memory size according to the memory situation of the server. 2. Incremental backup script

2.1 the first step is to make a full backup. After adding the-- no-timestamp parameter, the timestamp directory will not be created automatically, but in a custom way. During the test in this article, an incremental backup is made every hour.

Click (here) to collapse or open

Innobackupex-- defaults-file=/etc/my.cnf-- user=xtbakup-- password=oracle-- socket=/data/db/mysql/3306/mysql.sock / data/db/xtbakup/$ (date+%Y%m%d) /-- no-timestamp | gzip > fullbackup$ (date+%Y%m%d%H%M%S). Tar.gz2.2 first incremental backup script

Click (here) to collapse or open

Innobackupex-- defaults-file=/etc/my.cnf-- user=xtbakup-- password=oracle-- socket=/data/db/mysql/3306/mysql.sock-- incremental / data/db/incdata/$ (date +% Y%m%d%H) /-- incremental-basedir=/data/db/xtbakup/$ (date +% Y%m%d) /-- no-timestamp | gzip > incresbackup$ (date +% Y%m%d%H%M%S). Tar.gz2.3 second incremental backup script

Click (here) to collapse or open

Innobackupex-- defaults-file=/etc/my.cnf-- user=xtbakup-- password=oracle-- socket=/data/db/mysql/3306/mysql.sock-- incremental / data/db/incdata/$ (date +% Y%m%d%H) /-- incremental-basedir=/data/db/incdata/$ (date-d "- 1 hour" +% Y%m%d%H) /-- no-timestamp | gzip > incresbackup$ (date +% Y%m%d%H%M%S). Tar.gz in Incremental backups can be done with scheduled tasks on the Linux server!

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