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

Can't create logfiles after successfull backup

DissidentDissident EntrantInactive User Role Beginner
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:

sudo innobackupex --defaults-file=/etc/my.cnf --parallel=4 --password='mypass' --slave-info --safe-slave-backup --compress --compress-threads=4 --rsync --throttle=30 /backups/test/

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:

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?

Thanks in advance, Viktor.


  • jriverajrivera Percona Support Engineer Percona Staff Role
    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

    See if that works.
  • DissidentDissident Entrant Inactive User Role Beginner
    Thank you for answer.

    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:
    итого 19959240
    drwxr-xr-x 6 root root        4096 Фев 18 12:23 .
    drwxrwxrwx 3 root root        4096 Фев 18 12:07 ..
    -rw-r--r-- 1 root root         191 Фев 18 12:07 backup-my.cnf
    -rw-r----- 1 root root 20397690387 Фев 18 12:23 ibdata1.qp
    drwxr-xr-x 2 root root        4096 Фев 18 12:23 mysql
    drwxr-xr-x 2 root root        4096 Фев 18 12:23 performance_schema
    drwxr-xr-x 2 root root        4096 Фев 18 12:23 test
    -rw-r----- 1 root root         101 Фев 18 12:23 xtrabackup_checkpoints
    -rw-r--r-- 1 root root         612 Фев 18 12:23 xtrabackup_info
    -rw-r----- 1 root root    20554240 Фев 18 12:23 xtrabackup_logfile
    -rw-r--r-- 1 root root          78 Фев 18 12:23 xtrabackup_slave_info
    drwxr-xr-x 2 root root        4096 Фев 18 12:23 zabbix

    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:
    Attachment not found.

    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:
    Attachment not found.

    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?
  • jriverajrivera Percona Support Engineer Percona Staff Role
    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?
  • DissidentDissident Entrant Inactive User Role Beginner
    Full backup command is same as in the first post.
    Strange that images dissapeared, sorry for that.
    On the slave:
    On the test machine after restoring backup:

    And now I have another problem:

    I would be very pleased if you can help with that too.
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.