Hey!
Thanks you for great software at first. I am new in Linux Servers, trying to use Percona XtraBackup for creating backups of mysql with InnoDB tables.
First I start to create backup from slave server:
Some InnoDB info:
xtrabackup: using the following InnoDB configuration:
xtrabackup: innodb_data_home_dir = ./
xtrabackup: innodb_data_file_path = ibdata1:10M:autoextend
xtrabackup: innodb_log_group_home_dir = ./
xtrabackup: innodb_log_files_in_group = 2
xtrabackup: innodb_log_file_size = 1073741824
After 15 minutes I recieve message
innobackupex: completed OK!
I see files:
backup-my.cnf
mysql
xtrabackup_checkpoints
zabbix
ibdata1
performance_schema
xtrabackup_info
ibdata1.qp
test
xtrabackup_slave_info
Then, if I understood everything correctly, I must re-create log files. So I do
sudo innobackupex --apply-log --redo-only --defaults-file=/etc/my.cnf --parallel=4 --password=‘mypass’ --no-timestamp --slave-info --safe-slave-backup --compress --compress-threads=4 --rsync --throttle=30 /backups/test/2015-02-17_09-26-12
And I see:
xtrabackup version 2.2.6 based on MySQL server 5.6.21 Linux (x86_64) (revision id: )
xtrabackup: cd to /backups/test/2015-02-17_09-26-12
xtrabackup: This target seems to be not prepared yet.
2015-02-17 12:56:25 7ff58bdc8720 InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
xtrabackup: Warning: cannot open ./xtrabackup_logfile. will try to find.
xtrabackup: Fatal error: cannot find ./xtrabackup_logfile.
xtrabackup: Error: xtrabackup_init_temp_log() failed.
innobackupex: got a fatal error with the following stacktrace: at /usr/bin/innobackupex line 2632
main::apply_log() called at /usr/bin/innobackupex line 1561
innobackupex: Error:
innobackupex: ibbackup failed at /usr/bin/innobackupex line 2632.
For some reason I do not have “xtrabackup_logfile”, although backup creation was completed successfully.
Do you have any ideas about what am I doing wrong?
Did you create an incremental backup? I am wondering why you chose to use --redo-only option in this case.
Can you show us the output of:
shell> ls -al /backups/test/2015-02-17_09-26-12
I think since you’ve used --compress on your backup phase you need to run innobackupex with --decompress first to decompress the .qp files before the --apply-log phase.
So you’re backup command is:
innobackupex --defaults-file=/etc/my.cnf --slave-info --safe-slave-backup --compress --password=‘mypass’ --user=root --compress-threads=4 --rsync --throttle=30 /backups/test
Decompress the backup:
innobackupex --decompress /backups/test/$timestamp
Run apply log:
innobackupex --apply-log /backups/test/$timestamp
No, not incremental. I suppose, I used --redo-only by mistake in this case, thanks.
I tried to launch backup once again, and now for some reason I have xtrabackup_logfile… That’s good. Here is the output of ls -al:
Thanks for advice about decompression, I did not know that. Now I restored backup to another server (test server), mysql started working without problems. But I have other issue. I can’t check if zabbix work correct using test server, but I need to know, if everything is ok with my backup, and I decided try to create one more backup from restored server. And for some reason during this process in the output I see that numbers don’t change after “log scanned up to”. You can see this on the picture I attached:
[ATTACH=CONFIG]temp_290_1424252998248_650[/ATTACH]
In the end of process I see:
xtrabackup: Transaction log of lsn (1337943875107) to (1337943875107) was copied
Same numbers…
But backup “completed OK!”.
During the backup process on slave machine I saw in the output constantly changing numbers. I am attaching this picture too:
[ATTACH=CONFIG]temp_289_1424252980832_257[/ATTACH]
So I would like to ask, if these numbers don’t change during backup process, does it mean that backup data is corrupted? Or what does it mean?
I’m sorry but neither of the image attached on your post can be viewed. Maybe attach it to some other image sharing site and add the link here?
Also can you share the full backup command you used on your third post?