0

我的数据库文件似乎存在于 $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)
4

1 回答 1

1

如果您启用了 innodb_file_per_table,则表存储在它们自己的表空间中,但共享表空间(在您的情况下为 ibdata1 文件)仍用于存储其他 InnoDB 的内部数据:

  • 数据字典(InnoDB 表的元数据)
  • 更改缓冲区
  • 双写缓冲区
  • 撤消日志

因此,即使您创建了单个数据库的备份,文件 ibdata1 也会备份。

于 2015-01-15T07:18:37.497 回答