广告
返回顶部
首页 > 资讯 > 数据库 >使用XtraBackup 备份MySQL数据库
  • 351
分享到

使用XtraBackup 备份MySQL数据库

2024-04-02 19:04:59 351人浏览 泡泡鱼
摘要

本次测试使用XtraBackup备份Mysql数据库版本:XtraBackup2.4.5+mysql5.7.16下载地址:https://www.percona.com/downloads/XtraBack

本次测试使用XtraBackup备份Mysql数据库

版本:XtraBackup2.4.5+mysql5.7.16

下载地址:https://www.percona.com/downloads/XtraBackup/

1、安装XtraBackup

    本次为了方便,使用解压版本进行安装,直接解压就可以用了。

    使用过程中可能会遇到缺少perl依赖包的问题,我的方法是直接操作把镜像包里的perl都安装了,yum install -y perl*

2、简介

    XtraBackup主要包括两个备份工具xtrabackup和innobackupex。其中innobackupex对xtrabackup进行了封装。本次只介绍innobackupex备份Mysql

3、全量备的操作方法

1)创建备份

#创建存储备份数据的目录
[root@rhel7 ~]# mkdir /mysqlbackup
#开始备份
[root@rhel7 ~]# innobackupex --user=root --passWord=123456 /mysqlbackup
161213 12:27:13 innobackupex: Starting the backup operation

IMPORTANT: Please check that the backup run completes successfully.
           At the end of a successful backup run innobackupex
           prints "completed OK!".

161213 12:27:13  version_check Connecting to MySQL server with DSN 'dbi:mysql:;mysql_read_default_group=xtrabackup' as 'root'  (using password: YES).
Failed to connect to MySQL server: DBI connect(';mysql_read_default_group=xtrabackup','root',...) failed: Can't connect to local MySQL server through Socket '/var/lib/mysql/mysql.sock' (2) at - line 1314.
161213 12:27:13 Connecting to MySQL server host: localhost, user: root, password: set, port: 0, socket: (null)
Using server version 5.7.16
innobackupex version 2.4.5 based on MySQL server 5.7.13 linux (x86_64) (revision id: e41c0be)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /usr/local/mysql/data
xtrabackup: open files limit requested 0, set to 1024
xtrabackup: using the following InnoDB configuration:
xtrabackup:   innodb_data_home_dir = .
xtrabackup:   innodb_data_file_path = ibdata1:12M:autoextend
xtrabackup:   innodb_log_group_home_dir = ./
xtrabackup:   innodb_log_files_in_group = 2
xtrabackup:   innodb_log_file_size = 50331648
InnoDB: Number of pools: 1
161213 12:27:13 >> log scanned up to (2671643)
xtrabackup: Generating a list of tablespaces
InnoDB: Allocated tablespace ID 2 for mysql/plugin, old maximum was 0
161213 12:27:13 [01] Copying ./ibdata1 to /mysqlbackup/2016-12-13_12-27-13/ibdata1
161213 12:27:14 >> log scanned up to (2671643)
161213 12:27:15 [01]        ...done
161213 12:27:15 >> log scanned up to (2671643)
161213 12:27:15 [01] Copying ./mysql/plugin.ibd to /mysqlbackup/2016-12-13_12-27-13/mysql/plugin.ibd
161213 12:27:15 [01]        ...done
......
161213 12:27:16 [01] Copying ./wl/zx.ibd to /mysqlbackup/2016-12-13_12-27-13/wl/zx.ibd
161213 12:27:16 [01]        ...done
161213 12:27:16 >> log scanned up to (2671643)
161213 12:27:16 Executing FLUSH NO_WRITE_TO_BINLOG TABLES...
161213 12:27:16 Executing FLUSH TABLES WITH READ LOCK...
161213 12:27:16 Starting to backup non-InnoDB tables and files
161213 12:27:16 [01] Copying ./mysql/db.opt to /mysqlbackup/2016-12-13_12-27-13/mysql/db.opt
161213 12:27:16 [01]        ...done
......
161213 12:27:18 [01] Copying ./wl/wl.frm to /mysqlbackup/2016-12-13_12-27-13/wl/wl.frm
161213 12:27:18 [01]        ...done
161213 12:27:18 [01] Copying ./wl/zx.frm to /mysqlbackup/2016-12-13_12-27-13/wl/zx.frm
161213 12:27:18 [01]        ...done
161213 12:27:18 Finished backing up non-InnoDB tables and files
161213 12:27:18 Executing FLUSH NO_WRITE_TO_BINLOG ENGINE LOGS...
xtrabackup: The latest check point (for incremental): '2671634'
xtrabackup: Stopping log copying thread.
.161213 12:27:18 >> log scanned up to (2671643)

161213 12:27:18 Executing UNLOCK TABLES
161213 12:27:18 All tables unlocked
161213 12:27:18 [00] Copying ib_buffer_pool to /mysqlbackup/2016-12-13_12-27-13/ib_buffer_pool
161213 12:27:18 [00]        ...done
161213 12:27:18 Backup created in directory '/mysqlbackup/2016-12-13_12-27-13'
161213 12:27:18 [00] Writing backup-my.cnf
161213 12:27:18 [00]        ...done
161213 12:27:18 [00] Writing xtrabackup_info
161213 12:27:18 [00]        ...done
xtrabackup: Transaction log of lsn (2671634) to (2671643) was copied.
161213 12:27:19 completed OK!
#在指定的目录下生成了一个时间目录
[root@rhel7 ~]# ls -l /mysqlbackup/
total 4
drwxr-x---. 7 root root 4096 Dec 13 12:27 2016-12-13_12-27-13
[root@rhel7 ~]# du -sm /mysqlbackup/*
90	/mysqlbackup/2016-12-13_12-27-13

注意:innobackupex会去读取my.cnf文件中的[mysqld]和[xtrabackup]部分,也可以使用--defaults-file指定参数文件。

2)恢复全备的数据

备份的数据不能直接使用,需要先做prepare操作(可以理解为应用日志的过程,commit的事务提交,未commit的事务回滚)

#使用--apply-log应用日志,
[root@rhel7 ~]# innobackupex --apply-log /mysqlbackup/2016-12-13_12-27-13/
161213 12:36:24 innobackupex: Starting the apply-log operation

IMPORTANT: Please check that the apply-log run completes successfully.
           At the end of a successful apply-log run innobackupex
           prints "completed OK!".

innobackupex version 2.4.5 based on MySQL server 5.7.13 Linux (x86_64) (revision id: e41c0be)
xtrabackup: cd to /mysqlbackup/2016-12-13_12-27-13/
xtrabackup: This target seems to be not prepared yet.
InnoDB: Number of pools: 1
xtrabackup: xtrabackup_logfile detected: size=8388608, start_lsn=(2671634)
xtrabackup: using the following InnoDB configuration for recovery:
xtrabackup:   innodb_data_home_dir = .
xtrabackup:   innodb_data_file_path = ibdata1:12M:autoextend
xtrabackup:   innodb_log_group_home_dir = .
xtrabackup:   innodb_log_files_in_group = 1
xtrabackup:   innodb_log_file_size = 8388608
xtrabackup: using the following InnoDB configuration for recovery:
xtrabackup:   innodb_data_home_dir = .
xtrabackup:   innodb_data_file_path = ibdata1:12M:autoextend
xtrabackup:   innodb_log_group_home_dir = .
xtrabackup:   innodb_log_files_in_group = 1
xtrabackup:   innodb_log_file_size = 8388608
xtrabackup: Starting InnoDB instance for recovery.
xtrabackup: Using 104857600 bytes for buffer pool (set by --use-memory parameter)
InnoDB: PUNCH HOLE support not available
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Uses event mutexes
InnoDB: GCC builtin __sync_synchronize() is used for memory barrier
InnoDB: Compressed tables use zlib 1.2.3
InnoDB: Number of pools: 1
InnoDB: Not using CPU crc32 instructions
InnoDB: Initializing buffer pool, total size = 100M, instances = 1, chunk size = 100M
InnoDB: Completed initialization of buffer pool
InnoDB: page_cleaner coordinator priority: -20
InnoDB: Highest supported file fORMat is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 2671634
InnoDB: Doing recovery: scanned up to log sequence number 2671643 (0%)
InnoDB: Doing recovery: scanned up to log sequence number 2671643 (0%)
InnoDB: Database was not shutdown normally!
InnoDB: Starting crash recovery.
InnoDB: Creating shared tablespace for temporary tables
InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
InnoDB: File './ibtmp1' size is now 12 MB.
InnoDB: 96 redo rollback segment(s) found. 1 redo rollback segment(s) are active.
InnoDB: 32 non-redo rollback segment(s) are active.
InnoDB: Waiting for purge to start
InnoDB: 5.7.13 started; log sequence number 2671643

xtrabackup: starting shutdown with innodb_fast_shutdown = 1
InnoDB: FTS optimize thread exiting.
InnoDB: Starting shutdown...
InnoDB: Shutdown completed; log sequence number 2671671
InnoDB: Number of pools: 1
xtrabackup: using the following InnoDB configuration for recovery:
xtrabackup:   innodb_data_home_dir = .
xtrabackup:   innodb_data_file_path = ibdata1:12M:autoextend
xtrabackup:   innodb_log_group_home_dir = .
xtrabackup:   innodb_log_files_in_group = 2
xtrabackup:   innodb_log_file_size = 50331648
InnoDB: PUNCH HOLE support not available
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Uses event mutexes
InnoDB: GCC builtin __sync_synchronize() is used for memory barrier
InnoDB: Compressed tables use zlib 1.2.3
InnoDB: Number of pools: 1
InnoDB: Not using CPU crc32 instructions
InnoDB: Initializing buffer pool, total size = 100M, instances = 1, chunk size = 100M
InnoDB: Completed initialization of buffer pool
InnoDB: page_cleaner coordinator priority: -20
InnoDB: Setting log file ./ib_logfile101 size to 48 MB
InnoDB: Setting log file ./ib_logfile1 size to 48 MB
InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
InnoDB: New log files created, LSN=2671671
InnoDB: Highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 2672140
InnoDB: Doing recovery: scanned up to log sequence number 2672149 (0%)
InnoDB: Doing recovery: scanned up to log sequence number 2672149 (0%)
InnoDB: Database was not shutdown normally!
InnoDB: Starting crash recovery.
InnoDB: Removed temporary tablespace data file: "ibtmp1"
InnoDB: Creating shared tablespace for temporary tables
InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
InnoDB: File './ibtmp1' size is now 12 MB.
InnoDB: 96 redo rollback segment(s) found. 1 redo rollback segment(s) are active.
InnoDB: 32 non-redo rollback segment(s) are active.
InnoDB: Waiting for purge to start
InnoDB: 5.7.13 started; log sequence number 2672149
xtrabackup: starting shutdown with innodb_fast_shutdown = 1
InnoDB: FTS optimize thread exiting.
InnoDB: Starting shutdown...
InnoDB: Shutdown completed; log sequence number 2672168
161213 12:36:30 completed OK!
#查看prepare后数据目录的大小
[root@rhel7 ~]# ls -l /mysqlbackup/
total 4
drwxr-x---. 7 root root 4096 Dec 13 12:36 2016-12-13_12-27-13
[root@rhel7 ~]# du -sm /mysqlbackup/*
206	/mysqlbackup/2016-12-13_12-27-13

prepare完成后恢复数据到原MySQL的数据目录

注意:MySQL的数据目录必须为空,MySQL服务也必须停止,否则恢复会报错(除非恢复部分备份)

#创建一个测试库zx
[root@rhel7 ~]# mysql -uroot -p123456
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.16 Source distribution

Copyright (c) 2000, 2016, oracle and/or its affiliates. All rights reserved.

Oracle is a reGIStered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
| test               |
| wl                 |
+--------------------+
6 rows in set (0.10 sec)

mysql> create database zx;
Query OK, 1 row affected (0.00 sec)

mysql> exit
Bye
#停止MySQL数据库并创建新的data目录
[root@rhel7 ~]# service mysqld stop
Shutting down MySQL.. SUCCESS! 
[root@rhel7 ~]# cd $MYSQL_HOME
[root@rhel7 mysql]# ls
bin  COPYING  data  docs  include  lib  man  mysql-test  README  share  support-files
[root@rhel7 mysql]# mv data data_bak
[root@rhel7 mysql]# mkdir data
#恢复数据
[root@rhel7 mysql]# innobackupex --copy-back /mysqlbackup/2016-12-13_12-27-13/
161213 13:03:50 innobackupex: Starting the copy-back operation

IMPORTANT: Please check that the copy-back run completes successfully.
           At the end of a successful copy-back run innobackupex
           prints "completed OK!".

innobackupex version 2.4.5 based on MySQL server 5.7.13 Linux (x86_64) (revision id: e41c0be)
161213 13:03:50 [01] Copying ib_logfile0 to /usr/local/mysql/data/ib_logfile0
161213 13:03:50 [01]        ...done
161213 13:03:51 [01] Copying ib_logfile1 to /usr/local/mysql/data/ib_logfile1
161213 13:03:51 [01]        ...done
161213 13:03:52 [01] Copying ibdata1 to /usr/local/mysql/data/ibdata1
161213 13:03:54 [01]        ...done
161213 13:03:55 [01] Copying ./mysql/plugin.ibd to /usr/local/mysql/data/mysql/plugin.ibd
161213 13:03:55 [01]        ...done
161213 13:03:55 [01] Copying ./mysql/servers.ibd to /usr/local/mysql/data/mysql/servers.ibd
161213 13:03:55 [01]        ...done
161213 13:03:55 [01] Copying ./mysql/help_topic.ibd to /usr/local/mysql/data/mysql/help_topic.ibd
161213 13:03:55 [01]        ...done
161213 13:03:55 [01] Copying ./mysql/help_cateGory.ibd to /usr/local/mysql/data/mysql/help_category.ibd
161213 13:03:55 [01]        ...done
.......
161213 13:03:57 [01] Copying ./ibtmp1 to /usr/local/mysql/data/ibtmp1
161213 13:03:57 [01]        ...done
161213 13:03:57 completed OK!
#修改data目录下的权限
[root@rhel7 mysql]# chown mysql:mysql -R data
#启动MySQL数据库查看恢复是否成功
[root@rhel7 mysql]# service mysqld start
Starting MySQL. SUCCESS! 
[root@rhel7 mysql]# mysql -uroot -p123456
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.16 Source distribution

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
| test               |
| wl                 |
+--------------------+
6 rows in set (0.00 sec)
#数据恢复成功,测试数据库zx不见了。

4.增量备份的操作步骤

1)创建备份,增量备份需要有一个全量备份做基础,所以先做一个全量备份再做增量备份

#创建全备
[root@rhel7 mysql]# innobackupex --user=root --password=123456  /mysqlbackup/
[root@rhel7 mysql]# ls -l /mysqlbackup/
total 4
drwxr-x---. 8 root root 4096 Dec 13 13:10 2016-12-13_13-10-48
#删除一个测试库
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
| test               |
| wl                 |
| zx                 |
+--------------------+
7 rows in set (0.00 sec)

mysql> drop database zx;
Query OK, 0 rows affected (0.07 sec)
#创建增量备份(基于全备)
[root@rhel7 mysql]# innobackupex --user=root --password=123456 --incremental /mysqlbackup/ --incremental-basedir=/mysqlbackup/2016-12-13_13-10-48/
......
[root@rhel7 mysql]# ls -l /mysqlbackup/
total 8
drwxr-x---. 8 root root 4096 Dec 13 13:10 2016-12-13_13-10-48
drwxr-x---. 7 root root 4096 Dec 13 13:16 2016-12-13_13-16-17
[root@rhel7 mysql]# du -sm /mysqlbackup/*
90	/mysqlbackup/2016-12-13_13-10-48
3	/mysqlbackup/2016-12-13_13-16-17
#删除一个测试库
mysql> drop database wl;
Query OK, 0 rows affected (0.07 sec)
#创建增量备份(基于上次增量备份)
[root@rhel7 mysql]# innobackupex --user=root --password=123456 --incremental /mysqlbackup/ --incremental-basedir=/mysqlbackup/2016-12-13_13-16-17/
......
[root@rhel7 mysql]# ls -l /mysqlbackup/
total 12
drwxr-x---. 8 root root 4096 Dec 13 13:10 2016-12-13_13-10-48
drwxr-x---. 7 root root 4096 Dec 13 13:16 2016-12-13_13-16-17
drwxr-x---. 6 root root 4096 Dec 13 13:18 2016-12-13_13-18-30
[root@rhel7 mysql]# du -sm /mysqlbackup/*
90	/mysqlbackup/2016-12-13_13-10-48
3	/mysqlbackup/2016-12-13_13-16-17
4	/mysqlbackup/2016-12-13_13-18-30

2)恢复增量备份

同全量备份一样恢复里也需要prepare

#全量备份的prepare --redo-only表示只提交commit的事务
[root@rhel7 mysql]# innobackupex --apply-log --redo-only /mysqlbackup/2016-12-13_13-10-48/
#第一次增量备份prepare
[root@rhel7 mysql]# innobackupex --apply-log --redo-only /mysqlbackup/2016-12-13_13-10-48/ --incremental-dir=/mysqlbackup/2016-12-13_13-16-17/ 
#最后一次增量备份prepare 不再需要redo-only参数
[root@rhel7 mysql]# innobackupex --apply-log /mysqlbackup/2016-12-13_13-10-48/ --incremental-dir=/mysqlbackup/2016-12-13_13-18-30/
#停止MySQL服务创建新的data目录
[root@rhel7 mysql]# service mysqld stop
Shutting down MySQL.. SUCCESS! 
[root@rhel7 mysql]# rm -rf data
[root@rhel7 mysql]# mkdir data
#恢复数据
[root@rhel7 mysql]# innobackupex --copy-back /mysqlbackup/2016-12-13_13-10-48/
#修改data目录权限
[root@rhel7 mysql]# chown mysql:mysql -R data
#启动MySQL服务并验证
[root@rhel7 mysql]# service mysqld start
Starting MySQL... SUCCESS! 
[root@rhel7 mysql]# mysql -uroot -p123456
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.16 Source distribution

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
| test               |
| wl                 |
+--------------------+
6 rows in set (0.00 sec)

mysql> show tables in wl;
Empty set (0.00 sec)
#测试库zx没有了,wl库还在,但是库里的表已经没有了。

前边只是提供了简单的恢复方法,如果数据库备份之后运行了一段时间,数据库宕机了,如果只恢复备份的数据那就会丢失一部分数据。那这部分数据要怎么恢复呢。答案就是应用binlog。

在启用binlog的数据库中,备份完成后日志中会输出关于binlog的信息,生成的备份目录中也会有一个xtrabackup_binlog_info文件保存备份时的binlog位置。

161214 10:24:34 Executing UNLOCK TABLES
161214 10:24:34 All tables unlocked
161214 10:24:34 [00] Copying ib_buffer_pool to /mysqlbackup//2016-12-14_10-24-27/ib_buffer_pool
161214 10:24:34 [00]        ...done
161214 10:24:34 Backup created in directory '/mysqlbackup//2016-12-14_10-24-27'
#binlog位置
MySQL binlog position: filename 'mysql-bin.000001', position '154'
161214 10:24:34 [00] Writing backup-my.cnf
161214 10:24:34 [00]        ...done
161214 10:24:34 [00] Writing xtrabackup_info
161214 10:24:34 [00]        ...done
xtrabackup: Transaction log of lsn (2677865) to (2677874) was copied.
161214 10:24:34 completed OK!

[root@rhel7 2016-12-14_10-24-27]# ls -l
total 77876
-rw-r-----. 1 root root      425 Dec 14 10:24 backup-my.cnf
-rw-r-----. 1 root root      307 Dec 14 10:24 ib_buffer_pool
-rw-r-----. 1 root root 79691776 Dec 14 10:24 ibdata1
drwxr-x---. 2 root root     4096 Dec 14 10:24 mysql
drwxr-x---. 2 root root     8192 Dec 14 10:24 performance_schema
drwxr-x---. 2 root root     8192 Dec 14 10:24 sys
drwxr-x---. 2 root root       87 Dec 14 10:24 test
-rw-r-----. 1 root root       21 Dec 14 10:24 xtrabackup_binlog_info
-rw-r-----. 1 root root      113 Dec 14 10:24 xtrabackup_checkpoints
-rw-r-----. 1 root root      469 Dec 14 10:24 xtrabackup_info
-rw-r-----. 1 root root     2560 Dec 14 10:24 xtrabackup_logfile
#记录binlog位置的文件
[root@rhel7 2016-12-14_10-24-27]# cat xtrabackup_binlog_info
mysql-bin.000001	154

有了这个binlog日志位置就可以应用binlog恢复备份到宕机时间的数据

mysqlbinlog --start-position=154 mysql-bin.000001 | mysql -uroot -p123456

您可能感兴趣的文档:

--结束END--

本文标题: 使用XtraBackup 备份MySQL数据库

本文链接: https://www.lsjlt.com/news/40435.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • 使用XtraBackup 备份MySQL数据库
    本次测试使用XtraBackup备份MySQL数据库版本:XtraBackup2.4.5+MySQL5.7.16下载地址:https://www.percona.com/downloads/XtraBack...
    99+
    2022-10-18
  • 使用xtrabackup备份MySQL数据库
    前言 Xtrabackup提供了两种命令行工具: xtrabackup:专用于备份InnoDB和XtraDB引擎的数据; innobackupex:是一个perl脚本,在执行过程中会调用xtraback...
    99+
    2022-10-18
  • Xtrabackup备份mysql数据库
    Xtrabackup由percona提供percona Xtrabackup是一个自由、开源的完整的在线备份工具,支持mysql、perconna server、mariadb到官网https://www....
    99+
    2022-10-18
  • 如何使用Xtrabackup备份MySQL数据库
    这篇文章将为大家详细讲解有关如何使用Xtrabackup备份MySQL数据库,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。本文则演示如何从xtrabackup的备份中进行...
    99+
    2022-10-18
  • 怎么使用Xtrabackup备份MySQL数据库
    这篇文章主要为大家展示了“怎么使用Xtrabackup备份MySQL数据库”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“怎么使用Xtrabackup备份MySQ...
    99+
    2022-10-18
  • xtrabackup如何备份mysql数据库
    参考:http://mingxiao.blog.51cto.com/8124243/1623634一 全备1.命令安装:yum install -y gnupg rpm&nbs...
    99+
    2022-10-18
  • xtrabackup备份恢复MySQL数据库
    1. 全量备份恢复: 查看原表内容: MariaDB [(none)]> select * from testdb.students; +----+------------+------...
    99+
    2022-10-18
  • xtrabackup 实现MySQL数据库备份
    mysqldump备份方式是采用逻辑备份,其最大的缺陷就是备份和恢复速度都慢,对于一个小于50G的 数据库而言,这个速度还是能接受的,但如果数据库非常大,那再使用mysqldump备份就不太适合了。 这时就 需要一种好用又高效的工具,xtr...
    99+
    2018-06-08
    xtrabackup 实现MySQL数据库备份 数据库入门 数据库基础教程 数据库 mysql
  • Xtrabackup备份数据库
    Xtrabackup是一个对InnoDB做数据备份的工具,支持在线热备份(备份时不影响数据读写),是商业备份工具InnoDB Hotbackup的一个很好的替代品。   Xtr...
    99+
    2022-10-18
  • XtraBackup 备份还原 MySQL 5.6 数据库
    下载XtraBackup:# wget https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.4.6/binary/tarbal...
    99+
    2022-10-18
  • xtrabackup备份msyql数据库
     简介:Xtrabackup是由percona提供的mysql数据库备份工具,可以对Innodb数据库做热备特点:(1)备份过程快速、可靠(2)备份过程不会打断正在执行的事务(3)能够基于压缩等功...
    99+
    2022-10-18
  • 使用xtrabackup工具实现对MySQL数据库备份
    下文给大家带来有关使用xtrabackup工具实现对MySQL数据库备份内容,相信大家一定看过类似的文章。我们给大家带来的有何不同呢?一起来看看正文部分吧,相信看完使用xtrabackup工具实现对MySQ...
    99+
    2022-10-18
  • 使用XtraBackup恢复|备份 Mysql数据库 -- 数据恢复篇
                                 ...
    99+
    2022-10-18
  • xtrabackup进行MySQL数据库备份/还原
    http://hongge.blog.51cto.com/使用xtrabackup进行MySQL数据库备份前面介绍mysqldump备份方式是采用逻辑备份,其最大的缺陷就是备份和恢复速度都慢,对于一个小于5...
    99+
    2022-10-18
  • 如何配置xtrabackup备份mysql数据库
    这篇文章将为大家详细讲解有关如何配置xtrabackup备份mysql数据库,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。1    安装yum源:yu...
    99+
    2022-10-18
  • mysql数据库xtrabackup压缩备份测试
         网上有篇文章为:TB级mysql数据之xtrabackup压缩备份迁移方案,今天自己亲测下,看看效果。结论在最后给出。简单介绍下环境: win7下安装的vmware ...
    99+
    2022-10-18
  • 使用XtraBackup备份MySQL
    一、使用每表单个表空间这样ibdata1文件不会过大。xtrabackup可以使用部分备份了,需要在一个表一个文件的状况下才能使用。1.在使用xtrabackup之前,我们需要查看我们当前mysql是否是使...
    99+
    2022-10-18
  • XtraBackup备份还原MySQL数据库的过程
    本篇内容介绍了“XtraBackup备份还原MySQL数据库的过程”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有...
    99+
    2022-10-18
  • 使用xtrabackup备份innodb引擎的数据库
    innodb引擎的数据库可以使用mysqldump备份,如果表很大几十个G甚至上百G,显示用mysqldump备份会非常慢。然后使用xtrabackup 可以很快的在线备份innodb数据库。InnoDB ...
    99+
    2022-10-18
  • XtraBackup MySql 数据备份和恢复
    wget https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.4.12/binary/redhat/6/x86_64/percona-xtrabackup-24...
    99+
    2017-01-22
    XtraBackup MySql 数据备份和恢复
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作