[PATCH] --omit-dir-changes, qsort<>mergesort issues
hashproduct+rsync at gmail.com
Wed Jun 7 23:40:27 GMT 2006
On Fri, 2006-06-02 at 20:39 +0300, Antti Tapaninen wrote:
> - Sync /alt/root with backups to /alt/backup/YYYYMMDD.MMHH directory,
> ignore some files. (checksum hasn't changed, etc)
> - Full sync without ignores
> - unlink() files that were deleted between old and
> new /alt/root state.
> - Restore possible backups from /alt/backup directories
> with --remove-sent-files.  Ignore files that are known
> to be unmodified or were just added.
> The problems that I've encountered so far are: 1) rsync doesn't seem to
> preserve permissions/ownership for directories that are created in the
> backup directory. 2) synchronizing in archive mode, but not modifying any
> existing directory status is impossible or just too difficult for me. :)
I'm guessing that you are using rsync's --backup-dir, and for some
reason, rsync is failing to apply the permissions of the real
directories to the backup directories.
I would recommend instead that, on each sync, you move /alt/root
to /alt/backup/SOMETHING and pull a fresh /alt/root with
--link-dest=/alt/backup/SOMETHING. At a small additional cost in disk
space (for all those directory entries for the hard-linked files), you
get backup hierarchies that look exactly like the original ones and have
the correct attributes. You also might not have to mention multiple
backup directories when looking for a file to restore, removing the
If, as I suspect, I am completely missing the point, please explain your
problem in such a way that I have a hope of understanding!
More information about the rsync