Feature req: multiple source trees
marek at bmlv.gv.at
Mon Oct 22 22:13:02 EST 2001
I want to share a feature request I wrote here some time ago.
I'd like to give rsync more than 1 source-tree, where the "sum" (as
described below) is rsync'd to the destination.
suppose I have some machines, which have almost the same configuration,
different only in small details.
Then I want to rsync all machines from a master, with the details as
specific to every machine.
I propose the following mechanism:
- the commandline is parsed as now, but instead of a single source name an
array of source names is saved.
- on reading the source directories the first ("master") directory is read
- then the rest of the source directories is read, and every file there
which is already in memory is discarded. So only additional files are added
to memory. and ->basedir now points to the correct source directory.
so given this example
if I run rsync BASE --source 1 machine1:destination
the trees BASE and 1 are taken and rsync'd to machine1.
Another simple extension to this is to give a list of filenames (or a file
with a list of filenames) as parameter, and every file in this list is not
substituted but APPENDED.
So I could have a base /etc/passwd and another with the user accounts in
the different version directories and have them pushed together to the
other machine! Here a bitfield saying in which trees the file is present
would be good.
If no-one else starts working on that I'll do my worst - but it can take
More information about the rsync