0

All:

I'm trying to set up regularly-scheduled backups of our MariaDB cluster with mariabackup, and have set up an account for this purpose. The account is a member of group mysql. But when I run the backup as that user:

$ mariabackup --backup -u [myid] -p [password]
mariabackup: Generating a list of tablespaces
2017-12-08 17:49:07 140352620800128 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2017-12-08 17:49:07 140352620800128 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
mariabackup: error: xb_load_tablespaces() failed witherror code 11

If I run with sudo -u mysql, the exact same command works fine.

Is there a way to turn on extra debugging or verbosity so I can see WHICH file or directory it's having trouble accessing?

MariaDB v10.2.11, CentOS 7 (x86_64)

  • That's the problem. I don't know what the files/directories in question are, because it's not telling me what it's barfing on. As far as I can tell, all the relevant stuff has rw permissions for owner and group mysql, and the directories also have x for owner/group. But it's entirely possible I missed one. That's why it would be nice if there were a way to get it to tell me exactly where it's hitting the error 13. – Thomas J. Girsch Dec 10 '17 at 23:40
  • Disregard above comment, which was intended as a reply to the first answer given below. – Thomas J. Girsch Dec 11 '17 at 16:31
1

I was able to use the strace command to figure out what was going on. There were two problems. The first is that there was no group write permission on the output directory, so it failed to create the xtrabackup_backupfiles directory. The second is that there were two database directories in /var/lib/mysql that lacked group r-x permission. By fixing these two issues, I was able to get it to work.

Still, it would be nice if the error message actually indicated what specifically it didn't have permission on, rather than simply reporting that it lacked permission for something.

0

13 is, as it indicates "Permission denied". What does ls -l (or ls -ld) say is the ownership and permissions for the files/directories in question?

11 probably means out of disk space, but it could be a fallout of the '13'. It means "Resource temporarily unavailable".

  • That's the problem. I don't know what the files/directories in question are, because it's not telling me what it's barfing on. As far as I can tell, all the relevant stuff has rw permissions for owner and group mysql, and the directories also have x for owner/group. But it's entirely possible I missed one. That's why it would be nice if there were a way to get it to tell me exactly where it's hitting the error 13. – Thomas J. Girsch Dec 11 '17 at 16:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.