In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Backup user creation
CREATE USER 'bkpuser'@'localhost' IDENTIFIED BY' bkpuser'
GRANT RELOAD, LOCK TABLES, PROCESS, REPLICATION CLIENT ON. TO 'bkpuser'@'localhost'
FLUSH PRIVILEGES
II. Backup
-- perform a backup (without timestamp)
/ usr/local/xtrabackup/bin/innobackupex-defaults-file=/data/mysql/db_test/conf/test.cnf-- user=bkpuser-- password=bkpuser-- socket=/data/mysql/db_test/mysql.sock-- parallel=8-- slave-info-- no-timestamp / data/backups/full
-- perform backup (with timestamp)
/ usr/local/xtrabackup/bin/innobackupex-defaults-file=/data/mysql/db_test/conf/test.cnf-user=bkpuser-password=bkpuser-socket=/data/mysql/db_test/mysql.sock-parallel=8-slave-info / data/backups/full
-- perform a backup (specific to a library)
/ usr/local/xtrabackup/bin/innobackupex-defaults-file=/data/mysql/db_test/conf/test.cnf-- user=bkpuser-- password=bkpuser-- socket=/data/mysql/db_test/mysql.sock-- databases=t1-- parallel=8-- slave-info / data/backups/full
-- perform backup (incremental backup, incremental backup on a full basis)
/ usr/local/xtrabackup/bin/innobackupex-- defaults-file=/data/mysql/db_test/conf/test.cnf-- user=bkpuser-- password=bkpuser-- socket=/data/mysql/db_test/mysql.sock-- incremental-basedir=/data/backups/full/2018-05-02 13-42-59 /-- incremental / data/backups/inc
-- perform backup (incremental backup, incremental backup on the basis of additional backup)
/ usr/local/xtrabackup/bin/innobackupex-- defaults-file=/data/mysql/db_test/conf/test.cnf-- user=bkpuser-- password=bkpuser-- socket=/data/mysql/db_test/mysql.sock-- incremental-basedir=/data/backups/inc/2018-05-02 13-44-24 /-- incremental / data/backups/inc
III. Recovery
-full recovery
Rm-rf / data/mysql/db_test/data/ # Delete the data directory
Rm-rf / data/mysql/db_test/ulog/ # Delete the data directory
/ usr/local/xtrabackup/bin/innobackupex-- defaults-file=/data/mysql/db_test/conf/test.cnf-- user=bkpuser-- password=bkpuser-- apply-log-- redo-only / data/backups/full/2018-05-02 December 13-42-59 /
/ usr/local/xtrabackup/bin/innobackupex-defaults-file=/data/mysql/db_test/conf/test.cnf-user=bkpuser-password=bkpuser-copy-back / data/backups/full/2018-05-02 13-42-59 /
-- modify folder permissions
Chown-R mysql:mysql / data/mysql/db_test/data
Chown-R mysql:mysql / data/mysql/db_test/ulog
-- incremental recovery (incremental recovery on a complete basis)
-- in fact, it is to combine the complete equipment with the additional equipment, and then restore it.
Rm-rf / data/mysql/db_test/data/ # Delete the data directory
Rm-rf / data/mysql/db_test/ulog/ # Delete the data directory
/ usr/local/xtrabackup/bin/innobackupex-- defaults-file=/data/mysql/db_test/conf/test.cnf-- user=bkpuser-- password=bkpuser-- apply-log-- redo-only / data/backups/full/2018-05-02 December 13-42-59 /
/ usr/local/xtrabackup/bin/innobackupex-- defaults-file=/data/mysql/db_test/conf/test.cnf-- user=bkpuser-- password=bkpuser-- apply-log-- redo-only / data/backups/full/2018-05-02 13-42-59 /-- incremental-dir=/data/backups/inc/2018-05-02 13-44-24
/ usr/local/xtrabackup/bin/innobackupex-- defaults-file=/data/mysql/db_test/conf/test.cnf-- user=bkpuser-- password=bkpuser-- apply-log-- redo-only / data/backups/full/2018-05-02 December 13-42-59 /
/ usr/local/xtrabackup/bin/innobackupex-defaults-file=/data/mysql/db_test/conf/test.cnf-user=bkpuser-password=bkpuser-copy-back / data/backups/full/2018-05-02 13-42-59 /
-- incremental recovery (incremental recovery based on additional equipment)
-- restore all the equipment + additional equipment 1 + additional equipment 2 together
/ usr/local/xtrabackup/bin/innobackupex-- defaults-file=/data/mysql/db_test/conf/test.cnf-- user=bkpuser-- password=bkpuser-- apply-log-- redo-only / data/backups/full/2018-05-02 December 13-42-59 /
/ usr/local/xtrabackup/bin/innobackupex-- defaults-file=/data/mysql/db_test/conf/test.cnf-- user=bkpuser-- password=bkpuser-- apply-log-- redo-only / data/backups/full/2018-05-02 13-42-59 /-- incremental-dir=/data/backups/inc/2018-05-02 13-44-24
/ usr/local/xtrabackup/bin/innobackupex-- defaults-file=/data/mysql/db_test/conf/test.cnf-- user=bkpuser-- password=bkpuser-- apply-log-- redo-only / data/backups/full/2018-05-02 13-42-59 /-- incremental-dir=/data/backups/inc/2018-05-02 13-45-45
/ usr/local/xtrabackup/bin/innobackupex-- defaults-file=/data/mysql/db_test/conf/test.cnf-- user=bkpuser-- password=bkpuser-- apply-log-- redo-only / data/backups/full/2018-05-02 December 13-42-59 /
/ usr/local/xtrabackup/bin/innobackupex-defaults-file=/data/mysql/db_test/conf/test.cnf-user=bkpuser-password=bkpuser-copy-back / data/backups/full/2018-05-02 13-42-59 /
-- modify folder permissions
Chown-R mysql:mysql / data/mysql/db_test/data
Chown-R mysql:mysql / data/mysql/db_test/ulog
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.