Folks

May I pass my congratulations on a fantastically useful piece of code :)

I am reluctantly suggesting a new "feature" - comments/alternatives would
be welcome.

(I am willing to produce a patch for the feature I need, but for it to be
as clean as possible I am opening up for comments)

Feature suggestion:

In the general case of:
rsync --archive host::/path/username /localpath/username

I require that ownership + mode flags are duplicated to target *with the
exception of* the one directory /localpath/username which is pre-created
and needs forcing to mode 700 (user only).

I use this to ensure privacy of data where the user has subsequently made a
file private, then I don't want publicly readable copies lying around in
the target filesystem. Pedantic, yes. But the users like it this way...

Scenario:

I have a perl based system for making "Online Backups" of user homes
directories + other stuff. This works on the notion of "backup sets", where
each "set" is a single user tree or other distinct tree of data. (Before
you ask, I still use tapes - we just seldom need to do a tape restore
like this :)

My code sources from various data maps (autofs auto.homes map in my case).
It relocates target paths (to flatten home directories from many homedir
servers), manages reverse-incrementals (via --backup-dir) and issues a
seperate rsync job on each "set" to allow parallelism and reduce the rsync
memory impact. (Questions on this bit to me directly - I'll be happy to
talk about it more).

All I have done to date is a very dirty hack to rsync to turn of file
attribute setting at the top level only.

Now I am refining my code, to a state where I can release it to the
community. It seems right to try and solve the rsync issue as cleanly as
possible - preferably with a feature which may be useful to some of
the rsync users as a whole.

Various possible solutions might be (working names only)
1) --nosetperms-top: Don't set attributes on top target directory
2) --nosetperms-depth=n: Don't set attributes for top n directories/files
3) --nosetperms-pattern=patt: Ditto by by pattern using --exclude symantics
4) (implicit) if target ends in / then don't touch anything before the
slash (not current behaviour)
or even:
1a) --umask-top=umask: bitwise-AND umask with source flags for top target
directory.
2a,3a) As 2 and 3 using umask idea.

1/1a are least generic but very easy to do.
2/2a are probably quite straightforward and slightly neater
3/3a may be overkill, but would be the most general (that I can think of)
4) Affects the "standard" functionality - so would be not so good.

It is an offbeat idea - any comments, (even if you have no intention of
merging this feature in the main code) would still be very welcome :)

Cheers

Tim
-- 
Mr Tim J Southerwood
CSG, Dept of Computing, Imperial College, London
Tel: +44 (0)20 7594 8392
Email@Work: [EMAIL PROTECTED] Email@Home: [EMAIL PROTECTED]


Reply via email to