首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >mysql 迁移8

mysql 迁移8

作者头像
franket
发布于 2022-03-22 14:22:45
发布于 2022-03-22 14:22:45
2K0
举报
文章被收录于专栏:技术杂记技术杂记

备份完成

代码语言: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 
...
...

本文系转载,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

目录
  • 备份完成
  • 准备恢复
  • 恢复数据
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档