2

I'm trying to figure out why applying logs on my xtrabackup files isn't working.
I created a VM running MySQL 5.5.24. Then I created the sakila test database and backed it up with the following command:

innobackupex --user=bckuser --password=XXXX --no-timestamp --compress /var/lib/mysql/dumps/backup/;

This completed successfully. After that I wanted to apply the logs with this command:

innobackupex --user=bckuser --password=XXXX --apply-log /var/lib/mysql/dumps/backup/;  

But I get the following error:

140912 21:46:19  innobackupex: Starting ibbackup with command: xtrabackup_55  --defaults-file="/var/lib/mysql/dumps/backup/backup-my.cnf"  --defaults-group="mysqld" --prepare --target-dir=/var/lib/mysql/dumps/backup --tmpdir=/tmp

xtrabackup_55 version 2.1.9 for Percona Server 5.5.35 Linux (x86_64) (revision id: 746)
xtrabackup: cd to /var/lib/mysql/dumps/backup
xtrabackup: This target seems to be not prepared yet.
xtrabackup: xtrabackup_logfile detected: size=2097152, start_lsn=(8564748)
xtrabackup: using the following InnoDB configuration for recovery:
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 = 1
xtrabackup:   innodb_log_file_size = 2097152
xtrabackup: using the following InnoDB configuration for recovery:
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 = 1
xtrabackup:   innodb_log_file_size = 2097152
xtrabackup: Starting InnoDB instance for recovery.
xtrabackup: Using 104857600 bytes for buffer pool (set by --use-memory parameter)
140912 21:46:19 InnoDB: The InnoDB memory heap is disabled
140912 21:46:19 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140912 21:46:19 InnoDB: Compressed tables use zlib 1.2.3
140912 21:46:19 InnoDB: Initializing buffer pool, size = 100.0M
140912 21:46:19 InnoDB: Completed initialization of buffer pool
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
140912 21:46:19  InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
140912 21:46:20 InnoDB: Error: all log files must be created at the same time.
140912 21:46:20 InnoDB: All log files must be created also in database creation.
140912 21:46:20 InnoDB: If you want bigger or smaller log files, shut down the
140912 21:46:20 InnoDB: database and make sure there were no errors in shutdown.
140912 21:46:20 InnoDB: Then delete the existing log files. Edit the .cnf file
140912 21:46:20 InnoDB: and start the database again.
xtrabackup: innodb_init(): Error occured.
innobackupex: Error:
innobackupex: ibbackup failed at /usr/bin/innobackupex line 2560.

I have googled a lot, but I can't find out what's wrong. Do you guys have any idea?

2

Check the log, a bit above the error:

InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!

It is trying to create new innodb files because they are not found.

You need to decompress the files before applying the log:

innobackupex --decompress /...

Then, apply the log.

BTW, you do not need to specify the user and password once the first backup process was done.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.