我尝试运行innobackup脚本,使用以下脚本在MySQL docker实例上执行完整备份:
innobackupex --datadir=/usr/local/mysql/ -s --host=node1 --port=31057 --user=root --password=abc --compress --compress-threads=8 --stream=xbstream --parallel=4 ./ > /data/mysql-backup/2017-05-22/full/backup.xbstream
我有一个名为abc的数据库,在执行上面的脚本时,它抛出以下错误:
innobackupex: File './abc/tracking_rule.frm' not found (Errcode: 2 - No such file or directory)
InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
[01] error: cannot open file ./abc/tracking_rule.frm
[01] Error: copy_file() failed.
Failed to copy file ./abc/tracking_rule.frm"
我可以看到文件实际存在于datadir中。
此外cksum ./abc/tracking_rule.frm
失败了。它给出了错误:
没有文件或目录