Mark
asked on
rsync not deleting, why?
I run the following command:
rsync -rvtO --delete myUser@myHost:/backup/\* /backup/folder/
It copies the files from the source host, but does not delete files in the destination folder that no longer exist on the source. I get no error message. This rsync version is 3.0.4 protocol version 30. The --delete option on other computers just fine. the rsync user does have permission in the /backup/folder directory because I was able to delete a file in that directory by-hand logged in as the rsync user. The /backup directory is a mounted external USB drive.
Any ideas?
rsync -rvtO --delete myUser@myHost:/backup/\* /backup/folder/
It copies the files from the source host, but does not delete files in the destination folder that no longer exist on the source. I get no error message. This rsync version is 3.0.4 protocol version 30. The --delete option on other computers just fine. the rsync user does have permission in the /backup/folder directory because I was able to delete a file in that directory by-hand logged in as the rsync user. The /backup directory is a mounted external USB drive.
Any ideas?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the effort.
ASKER
I changed the rsync command to:
rsync -rvtO --delete myUser@myHost:/backup/ /backup/folder
When I ran this rsync command I got:
rsync: delete_file: unlink(2012-02-29-fullback
I checked the permissions on the file:
ls -l /backup/novatec/2012-02-29
-rw-rw-r-- 1 root backup 13017848257 2012-03-01 03:49 /backup/novatec/2012-02-29
Then I tried deleting the file manually and got:
rm /backup/novatec/2012-02-29
rm: remove write-protected regular file `/backup/novatec/2012-02-2
Now, the file is owned by root, and is in group 'backup', and has group rw permission. The user trying to rm the file is a member of group 'backup'. Why is it saying the file is "write-protected"? If I solve this mystery I should be able to get rsync working.