不加的话,还原数据的时候,有可能会出现以下问题,
xtrabackup: Error: Please set parameter 'datadir'
innobackupex: fatal error: no 'mysqld' group in MySQL options
innobackupex: fatal error: OR no 'datadir' option in group 'mysqld' in MySQL options
三,全部数据库备份与还原
1,全部数据库备份
# innobackupex --defaults-file=/etc/my.cnf --user=root /home/tank/backup/
如果报以下错误:
InnoDB: Error: log file ./ib_logfile0 is of different size 5242880 bytes
InnoDB: than specified in the .cnf file 50331648 bytes!
innobackupex: Error: The xtrabackup child process has died at /usr/bin/innobackupex line 2679.