Not the answer you need?
Register and ask your own question!

XtraBackup-8 restoration fails

jtsunnejtsunne EntrantLegacy User Role Novice
I have MySQL-8 server

[01:21 [email protected] ~]$ rpm -qa |grep percona
percona-server-shared-8.0.15-5.1.el7.x86_64
percona-toolkit-3.0.13-1.el7.x86_64
percona-server-client-8.0.15-5.1.el7.x86_64
percona-server-server-8.0.15-5.1.el7.x86_64
percona-server-shared-compat-8.0.15-5.1.el7.x86_64
percona-xtrabackup-80-8.0.5-1.el7.x86_64

[01:21 [email protected] ~]$ cat /etc/centos-release
CentOS Linux release 7.4.1708 (Core)

[01:21 [email protected] ~]$ cat /etc/my.cnf
### MANAGED BY PUPPET ###

[client]
default-character-set = utf8
port = 3306
socket = /var/lib/mysql/mysql.sock

[isamchk]
key_buffer_size = 16M

[mysqld]
basedir = /usr
bind-address = 0.0.0.0
binlog_format = ROW
character-set-server = utf8
collation-server = utf8_unicode_ci
datadir = /var/lib/mysql/
default-authentication-plugin = mysql_native_password
default-storage-engine = InnoDB
enforce-gtid-consistency = ON
expire_logs_days = 2
group_concat_max_len = 99999999999
gtid-mode = ON
innodb-flush-method = O_DIRECT
innodb_buffer_pool_size = 16G
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 3600
join_buffer_size = 2M
key_buffer_size = 128M
log-error = /var/log/mysqld.log
log_bin = /var/lib/mysql/mysql-bin.log
log_bin_trust_function_creators = 1
log_slave_updates = 1
master-info-repository = TABLE
max_allowed_packet = 128M
max_binlog_size = 1G
max_connect_errors = 1000000
max_connections = 1536
max_digest_length = 4096
max_heap_table_size = 1G
open-files-limit = 655350
performance_schema_max_digest_length = 4096
pid-file = /var/run/mysqld/mysqld.pid
port = 3306
read_rnd_buffer_size = 4M
relay-log = /var/lib/mysql/mysql-relay-bin
relay-log-info-repository = TABLE
replicate-ignore-db = sys
replicate-ignore-db = performance_schema
replicate-wild-ignore-table = sabio.statistics_urows_%
server-id = 103
skip-external-locking
skip-federated = true
slave_compressed_protocol = 1
slow-query-log = 1
slow-query-log-file = /var/lib/mysql/mysql-slow.log
socket = /var/lib/mysql/mysql.sock
sort_buffer_size = 4M
sql_mode = ""
ssl = false
ssl-ca = /etc/mysql/cacert.pem
ssl-cert = /etc/mysql/server-cert.pem
ssl-key = /etc/mysql/server-key.pem
sync_binlog = 1
sysdate-is-now = 1
table_definition_cache = 8192
table_open_cache = 8192
thread_cache_size = 1024
thread_stack = 256K
tmp_table_size = 1G
tmpdir = /tmp
user = mysql

I tried to create full backup:

xtrabackup --backup --stream=xbstream --compress-threads=8 --compress --target-dir=$BACKUP_DIRECTORY > $BACKUP_DIRECTORY/${SERVER}-${DATE}.xbstream

after that, I tried to restore the full backup on another server

xbstream -x < $BACKUP_DIRECTORY/${SERVER}-${DATE}.xbstream
xtrabackup --decompress --parallel=8 --remove-original --target-dir=/var/lib/mysql/.tmp

.......CUT........
Doing recovery: scanned up to log sequence number 16347816786432
Doing recovery: scanned up to log sequence number 16347822029312
my_realpath(./<DBNAME>/tmp_route.ibd) failed!
Creating the tablespace : ./<DBNAME>/tmp_route.ibd, space_id : 166458
my_realpath(./<DBNAME>/tmp_redirect_auto.ibd) failed!
........CUT.......
Creating the tablespace : ./<DBNAME>/tmp_page_data_product_to_category_page.ibd, space_id : 166468
Applying a batch of 10026 redo log records ...

and the restoration process was stuck

what was wrong with this process?
free spaces are OK
resources is enough

original and target MySQL servers are identical (created via one puppet manifest), the differences are only one - Server_id

maybe something wrong with backup?
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.