Replication: does it work in both directions?
Rudy Gevaert
Rudy.Gevaert at UGent.be
Mon Nov 12 02:38:44 EST 2007
Rich Wales wrote:
> 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?
No
>
> 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.
A first problem is that normally sync_client is started with -r (rolling
mode) in the start section of cyrus.conf. Running sync_client -u
wouldn't work because sync_client isn't started as a daemon.
You could try to put the sync_client -u lines in the event section of
cyrus.conf. If you then set the period rather small, you nearly have
synchronous replication.
> 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?
I wouldn't know.
--
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Rudy Gevaert Rudy.Gevaert at UGent.be tel:+32 9 264 4734
Directie ICT, afd. Infrastructuur ICT Department, Infrastructure office
Groep Systemen Systems group
Universiteit Gent Ghent University
Krijgslaan 281, gebouw S9, 9000 Gent, Belgie www.UGent.be
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
More information about the Info-cyrus
mailing list