mysql 迁移8

2022-03-22 14:22:45 浏览数 (1)

备份完成

代码语言:javascript复制
xtrabackup: Creating suspend file '/data/nfs/test_full_backup/2015-12-09_00-53-03/xtrabackup_log_copied' with pid '80799'
xtrabackup: Transaction log of lsn (4998915938330) to (4998984695861) was copied.
151209 02:06:09  innobackupex: Executing UNLOCK BINLOG
151209 02:06:09  innobackupex: Executing UNLOCK TABLES
151209 02:06:09  innobackupex: All tables unlocked

innobackupex: Backup created in directory '/data/nfs/test_full_backup/2015-12-09_00-53-03'
innobackupex: MySQL binlog position: filename 'mysql-bin.000004', position 8299670
151209 02:06:09  innobackupex: Connection to database server closed
151209 02:06:09  innobackupex: completed OK!

real	73m8.390s
user	6m33.032s
sys	7m44.089s

[1]   Done                    time nohup /usr/bin/innobackupex --defaults-file=/etc/my.cnf --user=root --password=xxxxxxxxxx /data/nfs/test_full_backup >> /data/nfs/full_backup.log 2>&1
[root@new-master nfs]# 

准备恢复

代码语言:javascript复制
[root@slave01 nfs]# which innobackupex 
/usr/bin/innobackupex
[root@slave01 nfs]# time nohup /usr/bin/innobackupex --apply-log /data/nfs/test_full_backup/2015-12-09_00-53-03/
nohup: ignoring input and appending output to `nohup.out'

real	1m43.335s
user	0m20.049s
sys	0m9.147s
[root@slave01 nfs]# 

恢复数据

代码语言:javascript复制
[root@slave01 data]# time nohup /usr/bin/innobackupex --copy-back /data/nfs/test_full_backup/2015-12-09_00-53-03/ >> restore.log  2>&1   &  
[1] 12635
[root@slave01 data]# 
[root@slave01 data]# tail -f restore.log 
...
...

0 人点赞