Cyrus 2.3.7 Replication Question

Robert Mueller robm at fastmail.fm
Wed Jul 12 21:09:45 EDT 2006


> Interesting. This process also implies you want to stop incoming mail
> for a period of time to both servers. Sound right?

I would say the process for "failover" is:

1. Server A is master (sync_client) replicating to Server B (sync_server)
2. Server A dies/is stopped
3. All IMAP/POP/LMTP connections are directed to Server B

For returning to original state:

1. On Server B, remove sync_server service
2. On Server A, add sync_server service
3. Start server A again (but keep all connections going to Server B, you 
might want to even disable IMAP/POP/LMTP on Server A for safety)
4. On Server B, enable sync_client replicating to Server A

Now the rolling replication will be replicating any changes on Server B to 
Server A. However, because of the gap, Server A will not be up to date with 
Server B. And since we weren't "logging" the sync requests on the slave, we 
don't know what's out of sync, so we have to run a sync_client -u for each 
user on Server B to make sure it's up to date on Server A.

5. Run sync_client -u for each user on Server B
6. Stop Server B
7. Ensure final sync/log file is flushed (David, does a clean shutdown of 
cyrus ensure this?)
8. Stop Server A
9. Start Server B with no sync_client, with a sync_server, and no 
IMAP/POP/LMTP ports
10. Start Server A with IMAP/POP/LMTP ports and no sync_server
11. Direct all connections to Server A

I think that should do it. There might be another option as well to make 
this easier. From the top:

1. Server A is master (sync_client) replicating to Server B (sync_server)
2. Server A dies/is stopped
3. Restart Server B after adding this to the imapd.conf
sync_log: 1
4. All IMAP/POP/LMTP connections are directed to Server B

Now Server B should be logging all changes to it's sync log, so you don't 
have to sync_client -u all users. Then to change back, follow from step 6-11 
above.

Hopefully David can clarify that this seems right/wrong.

Rob




More information about the Info-cyrus mailing list