5

I'm using rsync on Mac to back up to a USB drive or a network image (also HFS+ formatted). I'm having trouble with files from .svn subdirectories, such as 'all-wcprops' or 'entries' -- when checking out or updating, Subversion marks them as read-only (permissions bits are 444).

My rsync command chokes on that; they are backed up correctly during the first run, but any changes cause "permission denied" errors on target (backup volumes).

Maybe it's an artefact of Tortoise SVN - I'm actually using it from an XP virtual machine to do svn operations. But not using Tortoise is not an option.

How can I fix it? I spent some time trawling through rsync manuals and all the proper flags seem to be set. Can't find anything in Tortoise prefs either to allow me to tell it not to mark these files read only.

Here is my rsync command:

rsync -aNHAX --inplace --verbose --delete --delete-excluded --fileflags --force-change --exclude-from=.rsync/exclude-list ~ $backup_dir

3 Answers 3

5

I think you could either not use "--inplace" or synchronize in two steps.
This enhancement of rsync could also help you.

1
  • Thanks, without --inplace it actually works. Actually now I can see it in the rsync manual - "Also note that rsync will be unable to update a file in-place that is not writable by the receiving user".
    – ttarchala
    Oct 28, 2009 at 12:03
0

I think the problem might be that the external drive or network image might have a space in the volume path and rsync isn't escaping the space.

That is if your volume is named "Big Honking USB" the path is probably something like

/Volumes/Big Honking USB

and rsync isn't smart enough to realize it and escape the spaces. Try rsyncing to somewhere like /home/username/Downloads and seeing if that works.

2
  • Thank you for the interesting idea. But after nearly 8 years since asking the original question, I have moved away from rsync as the backup mechanism and I no longer have a way to test if your answer is good :-)
    – ttarchala
    May 23, 2017 at 21:37
  • I ran into this problem just yesterday, so it seems to still exist. ;)
    – Aphoid
    May 24, 2017 at 14:26
0

If you still want to use --inplace and can live with read-only files not being read-only in the destination, you can use --chmod=Fu+w.

That option forces owner write permissions onto every file (excluding directories).

To update any read-only files that already exist in the destination, you can run rsync once without the --inplace option.

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.