Creating a backup with nonstandard innodb_log_file_size

What is the proper way to create a backup using the latest xtrabackup (2.0.5) and innobackupex when you have a nonstandard innodb_log_file_size (not 5mb).

The command I’m currently running is:

innobackupex --user= --password= --defaults-file=/etc/my.cnf myBackup

where /etc/my.cnf has the innodb_log_file_size defined to 512MB.

Running this command causes the backup process to error saying the log file size is incorrect, not 5mb. Up until this point I’ve hacked in a method that actually reads the passed in defaults file and sets the correct filesize as its defined in there in the script, and this works but I feel like there must be a better way to do this.

Thanks!
Stephen

Hi,

Xtrabackup is compatible with any innodb_log_file_size. Can you please attach the error log and the my.cnf? I would like to reproduce the issue.

Regards.

mysql --version

mysql Ver 14.12 Distrib 5.0.92, for unknown-linux-gnu (x86_64) using readline 5.1

#cat /etc/my.cnf | grep innodb_log_file_size
set-variable = innodb_log_file_size=536870912

mysql -uroot -p -e “show global variables like ‘%innodb_log_file_size%’;”

±---------------------±----------+
| Variable_name | Value |
±---------------------±----------+
| innodb_log_file_size | 536870912 |
±---------------------±----------+

innobackupex --user=root --password=XXXX --defaults-file=/etc/my.cnf .

InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona Ireland Ltd 2009-2012. All Rights Reserved.

This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.

130128 09:36:51 innobackupex: Starting mysql with options: --defaults-file=‘/etc/my.cnf’ --password=xxxxxxxx --user=‘root’ --unbuffered –
130128 09:36:51 innobackupex: Connected to database with mysql child process (pid=18235)
130128 09:36:57 innobackupex: Connection to database server closed
IMPORTANT: Please check that the backup run completes successfully.
At the end of a successful backup run innobackupex
prints “completed OK!”.

innobackupex: Using mysql Ver 14.12 Distrib 5.0.92, for unknown-linux-gnu (x86_64) using readline 5.1
innobackupex: Using mysql server version Copyright (C) 2000-2008 MySQL AB

innobackupex: Created backup directory /root/2013-01-28_09-36-57
130128 09:36:57 innobackupex: Starting mysql with options: --defaults-file=‘/etc/my.cnf’ --password=xxxxxxxx --user=‘root’ --unbuffered –
130128 09:36:57 innobackupex: Connected to database with mysql child process (pid=18259)
130128 09:36:59 innobackupex: Connection to database server closed

130128 09:36:59 innobackupex: Starting ibbackup with command: xtrabackup_51 --defaults-file=“/etc/my.cnf” --defaults-group=“mysqld” --backup --suspend-at-end --target-dir=/root/2013-01-28_09-36-57
innobackupex: Waiting for ibbackup (pid=18265) to suspend
innobackupex: Suspend file ‘/root/2013-01-28_09-36-57/xtrabackup_suspended’

xtrabackup_51 version 2.0.5 for MySQL server 5.1.59 unknown-linux-gnu (x86_64) (revision id: 499)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /var/lib/mysql
xtrabackup: Target instance is assumed as followings.
xtrabackup: innodb_data_home_dir = /var/lib/mysql
xtrabackup: innodb_data_file_path = ibdata1:10M:autoextend
xtrabackup: innodb_log_group_home_dir = /var/lib/mysql
xtrabackup: innodb_log_files_in_group = 2
xtrabackup: innodb_log_file_size = 5242880
InnoDB: Error: log file /var/lib/mysql/ib_logfile0 is of different size 0 536870912 bytes
InnoDB: than specified in the .cnf file 0 5242880 bytes!
innobackupex: Error: ibbackup child process has died at /usr/bin/innobackupex line 381.