Replication: does it work in both directions?
richw at richw.org
Sun Nov 11 23:41:04 EST 2007
Earlier, I wrote:
>> What do I need to do in order for changes made on the replica
>> to get copied over to the master?
Bron Gondwana replied:
> Impossible. You don't do this. What you can do (the simple
> case of what we do) is set up two Cyrus instances on each
> machine, replicating to each other, and set up user accounts
> on one or the other, so you can get full use of both machines.
I note that sync_client can take a list of mailboxes on the command
line. Does this define (and limit) the set of mailboxes that are
replicated? If a mailbox is listed in the command line, are sub-
mailboxes replicated too?
My environment (family network) only has half a dozen users, and the
set of users changes only rarely. Suppose I do the following:
(1) I divide my users into two groups -- each group assigned to one
of my two Cyrus servers as the master for those users.
(2) The sync_client line in cyrus.conf for each server lists the
mailboxes for the users assigned to that server as master. Each
user is listed in the sync_client command line of only one server.
(3) Each server is configured (via the sync_... lines in imapd.conf)
to sync to the other server.
(4) Both servers would be running sync_server.
So, I would have replication set up going both directions between my
two servers, but the sets of users handled in each direction would be
disjoint. Each user would be assigned to one IMAP server (the master
for their mailbox collection), and the other server would be their
replica and act as their backup.
Would this work?
Remember, again, that I'm talking about a small installation. Clearly,
a scheme requiring every user's mailbox to be explicitly listed in one
or the other server's sync_client line is not going to scale to a large
setup with hundreds or thousands of users; I understand this.
If this idea of doing two-way partial replication with a single Cyrus
instance on each server will in fact work, should I use the same value
for sync_machineid on both servers? Or should they be different?
Rich Wales === Palo Alto, CA, USA === richw at richw.org
http://www.richw.org === http://en.wikipedia.org/wiki/User:Richwales
"The difference between theory and practice is that, in theory,
theory and practice are identical -- whereas in practice, they aren't."
More information about the Info-cyrus