Operating system error number 13 in a file operation

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 的错误提示也太不人性了,有待该进啊。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值