I'm trying to do a mysqldump to an external USB hard disk on Ubuntu 10.04 LTS Server
The directory on the disk has the following permissions:
drwxrwxr-x 2 root root 39 Jun 4 09:13 mysql/
Here is the command I am attempting to run (logged in as root):
mysqldump -u root -p********* database_name | gzip > /backup/mysql/database_name_`date '+%m-%d-%Y'`.sql.gz
And here is the output:
bash: /backup/mysql/database_name_06-04-2013.sql.gz: Permission denied
mysqldump: Got errno 32 on write
It also fails the same way if I take gzip out of the equation and just do:
mysqldump -u root -p********* database_name > /backup/mysql/database_name_`date '+%m-%d-%Y'`.sql
I can touch files, copy files into the directory, delete, rename, etc as root, but when I try to run this, I get permission denied. If I run the same command to a directory not on this external disk, it works fine. I don't understand what's going on here. Please help
Here's some more info:
fstab line: /dev/sdc1 /backup xfs rw 0 0
The drive is connected via USB. It's a 1TB Western Digital RE4, formatted as XFS.
Thanks guys, any ideas would be much appreciated!