mysql 迁移10

2022-03-22 11:44:52 浏览数 (1)

监测进展

代码语言:javascript复制
[root@slave02 data]# watch -n 2 du -sh /data/mysql/

每两秒看一下数据目录大小


恢复完成

代码语言:javascript复制
151209 03:57:34 [01] Copying ./mysqltestt_db/kqmobile_payments.ibd to
/var/lib/mysql/mysqltestt_db/kqmobile_payments.ibd
151209 03:57:34 [01]        ...done
151209 03:57:34 [01] Copying ./mysqltestt_db/member_orders.frm to
/var/lib/mysql/mysqltestt_db/member_orders.frm
151209 03:57:34 [01]        ...done
151209 03:57:34 [01] Copying ./mysqltestt_db/smsg_runner_logs.ibd to
/var/lib/mysql/mysqltestt_db/smsg_runner_logs.ibd
151209 03:57:34 [01]        ...done
151209 03:57:34 completed OK!

real	73m17.260s
user	0m0.782s
sys	19m4.516s
^C
[1]   Done                    time nohup /usr/bin/innobackupex --copy-back
/data/nfs/test_full_backup/2015-12-09_00-53-03/ >> restore.log 2>&1
[root@slave02 data]# 

修改权限

代码语言:javascript复制
[root@slave02 mysql]# cat xtrabackup_binlog_pos_innodb 
mysql-bin.000004	8299670
[root@slave02 mysql]# ll 
total 5916780
drwx------ 2 root root       4096 Dec  9 02:49 livedb
drwx------ 2 root root       4096 Dec  9 02:57 mysqltest_his
drwx------ 2 root root      36864 Dec  9 03:57 mysqltestt_db
drwx------ 2 root root       4096 Dec  9 03:08 stuff_on
drwx------ 2 root root       4096 Dec  9 02:52 javadb
-rw-r----- 1 root root 5253365760 Dec  9 02:45 ibdata1
-rw-r----- 1 root root  268435456 Dec  9 02:44 ib_logfile0
-rw-r----- 1 root root  268435456 Dec  9 02:44 ib_logfile1
-rw-r----- 1 root root  268435456 Dec  9 02:44 ib_logfile2
drwx------ 2 root root       4096 Dec  9 02:52 ijavadb
drwx------ 2 root root      12288 Dec  9 03:08 wavedb
drwx------ 2 root root       4096 Dec  9 03:08 mobildb
drwx------ 2 root root       4096 Dec  9 02:45 mysql
drwx------ 2 root root       4096 Dec  9 02:49 testdb
drwx------ 2 root root       4096 Dec  9 02:49 keydb
drwx------ 2 root root       4096 Dec  9 03:08 performance_schema
drwx------ 2 root root       4096 Dec  9 02:52 functiondb
drwx------ 2 root root       4096 Dec  9 02:52 test
-rw-r----- 1 root root         25 Dec  9 03:08 xtrabackup_binlog_pos_innodb
-rw-r----- 1 root root        710 Dec  9 03:08 xtrabackup_info
[root@slave02 mysql]# chown  -R mysql.mysql /var/lib/mysql/
[root@slave02 mysql]# ll 
total 5916780
drwx------ 2 mysql mysql       4096 Dec  9 02:49 livedb
drwx------ 2 mysql mysql       4096 Dec  9 02:57 mysqltest_his
drwx------ 2 mysql mysql      36864 Dec  9 03:57 mysqltestt_db
drwx------ 2 mysql mysql       4096 Dec  9 03:08 stuff_on
drwx------ 2 mysql mysql       4096 Dec  9 02:52 javadb
-rw-r----- 1 mysql mysql 5253365760 Dec  9 02:45 ibdata1
-rw-r----- 1 mysql mysql  268435456 Dec  9 02:44 ib_logfile0
-rw-r----- 1 mysql mysql  268435456 Dec  9 02:44 ib_logfile1
-rw-r----- 1 mysql mysql  268435456 Dec  9 02:44 ib_logfile2
drwx------ 2 mysql mysql       4096 Dec  9 02:52 ijavadb
drwx------ 2 mysql mysql      12288 Dec  9 03:08 wavedb
drwx------ 2 mysql mysql       4096 Dec  9 03:08 mobildb
drwx------ 2 mysql mysql       4096 Dec  9 02:45 mysql
drwx------ 2 mysql mysql       4096 Dec  9 02:49 testdb
drwx------ 2 mysql mysql       4096 Dec  9 02:49 keydb
drwx------ 2 mysql mysql       4096 Dec  9 03:08 performance_schema
drwx------ 2 mysql mysql       4096 Dec  9 02:52 functiondb
drwx------ 2 mysql mysql       4096 Dec  9 02:52 test
-rw-r----- 1 mysql mysql         25 Dec  9 03:08 xtrabackup_binlog_pos_innodb
-rw-r----- 1 mysql mysql        710 Dec  9 03:08 xtrabackup_info
[root@slave02 mysql]# ll -d /data/mysql/
drwxr-xr-x 16 mysql mysql 20480 Dec  9 03:08 /data/mysql/
[root@slave02 mysql]# 

0 人点赞