anhnongdan / bimax_ha_migration

all db backup, recovery and migration scenarios for bimax
0 stars 0 forks source link

Some error occurred in log file after restoring #13

Closed anhnongdan closed 6 years ago

anhnongdan commented 6 years ago
/usr/bin/xtrabackup version 2.4.8 based on MySQL server 5.7.13 Linux (x86_64) (revision id: 97330f7)
xtrabackup: cd to /data/backup/pw2/
xtrabackup: This target seems to be not prepared yet.
InnoDB: Number of pools: 1
xtrabackup: xtrabackup_logfile detected: size=8388608, start_lsn=(237161316552)
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 available
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Uses event mutexes
InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
InnoDB: Compressed tables use zlib 1.2.7
InnoDB: Number of pools: 1
InnoDB: 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: Log file ./ib_logfile1 is of different size 50331648 bytes than other log files 8388608 bytes!
InnoDB: Plugin initialization aborted with error Generic error
xtrabackup: innodb_init(): Error occured.
/usr/bin/xtrabackup version 2.4.8 based on MySQL server 5.7.13 Linux (x86_64) (revision id: 97330f7)

Finally, still received

170912 15:01:11 completed OK!
You have mail in /var/spool/mail
anhnongdan commented 6 years ago

This problem causes DB on new host can't start up.

[root@VNPT-HNI-ANALYTIC-03 bimax_ha_migration]# sh restore.sh 2
/usr/bin/xtrabackup version 2.4.8 based on MySQL server 5.7.13 Linux (x86_64) (revision id: 97330f7)
xtrabackup: cd to /data/backup/pw2/
xtrabackup: This target seems to be not prepared yet.
InnoDB: Number of pools: 1
xtrabackup: xtrabackup_logfile detected: size=11927552, start_lsn=(241030405057)
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 = 11927552
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 = 11927552
xtrabackup: Starting InnoDB instance for recovery.
xtrabackup: Using 104857600 bytes for buffer pool (set by --use-memory parameter)
InnoDB: PUNCH HOLE support available
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Uses event mutexes
InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
InnoDB: 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: Log file ./ib_logfile1 is of different size 50331648 bytes than other log files 11927552 bytes!
InnoDB: Plugin initialization aborted with error Generic error
xtrabackup: innodb_init(): Error occured.
/usr/bin/xtrabackup version 2.4.8 based on MySQL server 5.7.13 Linux (x86_64) (revision id: 97330f7)
anhnongdan commented 6 years ago

It seems that xtrabackup need the right my.cnf to prepare the db.

Data Source

[root@VNPT-HNI-ANALYTIC-02 backup]# ll
total 211048
-rw-r----- 1 root root       418 Sep 29 13:43 backup-my.cnf
-rw-r----- 1 root root 213909504 Sep 29 13:43 ibdata1
drwxr-x--- 2 root root      4096 Sep 29 13:43 mysql
drwxr-x--- 2 root root      4096 Sep 29 13:43 performance_schema
drwxr-x--- 2 root root     12288 Sep 29 13:43 pw2
-rw-r----- 1 root root       123 Sep 29 13:43 xtrabackup_checkpoints
-rw-r----- 1 root root       672 Sep 29 13:43 xtrabackup_info
-rw-r----- 1 root root   2164736 Sep 29 13:43 xtrabackup_logfile

Data dir

[root@VNPT-HNI-ANALYTIC-03 bimax_ha_migration]# ll /data/backup/pw2/
total 282032
-rw-r-----. 1 root root       418 Sep 29 13:43 backup-my.cnf
-rw-r-----. 1 root root 213909504 Sep 29 13:43 ibdata1
-rw-r-----. 1 root root  50331648 Sep 27 16:37 ib_logfile1
-rw-r-----. 1 root root  12582912 Sep 27 16:37 ibtmp1
drwxr-x---. 2 root root      8192 Sep 29 13:43 mysql
drwxr-x---. 2 root root      4096 Sep 29 13:43 performance_schema
drwxr-x---. 2 root root     12288 Sep 29 13:43 pw2
-rw-r-----. 1 root root       123 Sep 29 13:43 xtrabackup_checkpoints
-rw-r-----. 1 root root       672 Sep 29 13:43 xtrabackup_info
-rw-r-----. 1 root root  11927552 Sep 29 14:15 xtrabackup_logfile
anhnongdan commented 6 years ago

9c80415f8e9bacdb5480ea559aa9bf236e72f55b