innobackupex 备份时遇到下述错误:
InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: os_file_readdir_next_file() returned -1 in directory ./etc, crash recovery may have failed for some .ibd files!
InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
innobackupex: Error: The xtrabackup child process has died at /usr/bin/innobackupex line 2681.
问问google说可能是selinux引起的。
# getenforce 和 ls -Z 检查发现果然是和selinux有关。
生产环境,先关掉selinux,在用chcon去修改selinux文件属性,我想还是算了吧。
切换到root用户,执行备份命令,ok。
拿到备份去做恢复的时候,感觉备份文件比较小。解压一看,发现数据库没备份成功。
切换到mysql用户,错误依旧。翻官方文档,原来是my.cnf中没有设置datadir。在my.cnf中设置datadir,备份成功。
innobackupex 的错误提示也太不人性了,有待该进啊。

908

被折叠的 条评论
为什么被折叠?



