I found it.
my.cnf
file did not contain datadir=
configuration directive. I had passed --datadir
option to the mysqld
program instead of putting it on my.cnf
.
This issue has been solved by just adding datadir=
configuration to my.cnf
.
Domanda
I tried to use Percona Xtrabackup to backup all InnoDB databases in my MySQL data directory.
After executing the following command:
innobackupex --host=127.0.0.1 --port=3306 --user root --password PASSWD --defaults-file=/path/to/my.cnf --slave-info /backup/xtrabackup
The process seemed to be completed with the following log:
InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona LLC and/or its affiliates 2009-2013. All Rights Reserved.
...
innobackupex: Using mysql server version 5.6.12
innobackupex: Created backup directory /nobackup/xtrabackup/2014-02-24_00-04-21
...
[01] Copying /var/lib/mysql/ibdata1 to /nobackup/xtrabackup/2014-02-24_00-04-21/ibdata1
>> log scanned up to (178807644573)
....
140224 00:05:34 innobackupex: completed OK!
However, the result is too small compared to original database files:
# Source database
# du -sm /var/lib/mysql/
19G /var/lib/mysql/
# Xtrabackup result
# du -sm /nobackup/xtrabackup
455M /nobackup/xtrabackup
My InnoDB configuration (in /path/to/my.cnf
) are as following:
innodb_file_per_table
innodb_file_format=Barracuda
Looking at the execution log, it shows the program only copied ibdata1
but not other many *.idb files.
I wonder if Xtrabackup cannot handle databases stored with innodb_file_per_table
. I couldn’t find any hints in its documentation.
Is that true, or any solutions/ideas?
# find /nobackup/xtrabackup
/nobackup/xtrabackup
/nobackup/xtrabackup/2014-02-24_00-04-21
/nobackup/xtrabackup/2014-02-24_00-04-21/xtrabackup_logfile
/nobackup/xtrabackup/2014-02-24_00-04-21/ibdata1
/nobackup/xtrabackup/2014-02-24_00-04-21/xtrabackup_checkpoints
/nobackup/xtrabackup/2014-02-24_00-04-21/backup-my.cnf
/nobackup/xtrabackup/2014-02-24_00-04-21/2014-02-24_00-04-21
/nobackup/xtrabackup/2014-02-24_00-04-21/xtrabackup_binary
Soluzione
I found it.
my.cnf
file did not contain datadir=
configuration directive. I had passed --datadir
option to the mysqld
program instead of putting it on my.cnf
.
This issue has been solved by just adding datadir=
configuration to my.cnf
.