我的数据库文件似乎位于$ DATADIR / mydb中,而ibdata1位于$ DATADIR /中,我只想备份mydb
,但是每次innobackupex显示它正在复制ibdata1时,任何人都可以帮助我吗?
141120 15:53:42 innobackupex: Starting ibbackup with command: xtrabackup --defaults-group="mysqld" --backup --suspend-at-end --target-dir=/var/lib/mysqltmp --tmpdir=/var/lib/mysqltmp --extra-lsndir='/var/lib/mysqltmp' --stream=tar
innobackupex: Waiting for ibbackup (pid=22068) to suspend
innobackupex: Suspend file '/var/lib/mysqltmp/xtrabackup_suspended_2'
xtrabackup version 2.2.3 based on MySQL server 5.6.17 Linux (x86_64) (revision id: )
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /data/mysql
xtrabackup: open files limit requested 0, set to 4096
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 = 268435456
>> log scanned up to (2908642830241)
[01] Streaming ./ibdata1
>> log scanned up to (2908643251964)
>> log scanned up to (2908643769190)
>> log scanned up to (2908644204556)
>> log scanned up to (2908644655653)
最佳答案
如果启用了innodb_file_per_table,则表将存储在它们自己的表空间中,但是共享表空间(在您的情况下为ibdata1文件)仍用于存储其他InnoDB的内部数据:
数据字典(InnoDB表的元数据)
变更缓冲区
双写缓冲区
撤消日志
因此,即使在创建单个数据库的备份时,文件ibdata1也会备份。
关于mysql - 当我使用--databases ='mydb'指定时,innobackupex总是备份ibdata1,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/27034763/