Re: Replication: does it work in both directions?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx          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
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
----
Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux