Replication and Deleted Files

Michael Menge michael.menge at zdv.uni-tuebingen.de
Thu Jun 4 13:56:35 EDT 2020


Hi,

Quoting Ian Batten via Info-cyrus <info-cyrus at lists.andrew.cmu.edu>:

> Hi, long-time Cyrus user (25 years, I think), but stumped on this one…
>
> I have an ancient Cyrus 2.5.11 on Solaris 11 installation I am  
> trying to migrate off.  The strategy is to run rolling replication  
> onto the new server (3.0.8-6+deb10u4 on Debian 10.4), and then point  
> the DNS record at the new server.  With Covid, this has become more  
> protracted than I would like, as I don’t want to accidentally mess  
> up users who are isolating, so the replication has been running for  
> some weeks.
>
> The replication structure is old-server -> new-server -> (backup1,  
> backup2) where backup1 and backup2 are configured as separate  
> channels on new-server.  This has been running seemingly correctly  
> for about three months now.
>
> Today I decided to check all was well by using rsync -an to confirm  
> that the replicas have everything that is on the master.  They do,  
> in that using 
>
> rsync -anvO --size-only  --exclude='cyrus.*'  
> root at mail:/var/imap/partition1/user/ /var/imap/partition1/user 
>
> where “mail” is the old server shows that there are no messages  
> missing (—size-only because there’s some time slew in a few places,  
> usually only of a few seconds, but up to a day in others).
>
> However, reversing it:
>
> rsync -anvO --size-only  --exclude='cyrus.*'  
> /var/imap/partition1/user/ root at mail:/var/imap/partition1/user
>
> Shows that there are a _lot_ of files on the replicas which are not  
> on the master, some of them relating to recent deletions, but some  
> of them seemingly quite old.  I am using:
>
> delete_mode: delayed
> expunge_mode: delayed
>
> everywhere, running cyr_expire on the master but not on the  
> replicas.  I have enough bandwidth that sync_reset and re-sync is  
> realistic, but I’d rather not have to do that immediately prior to a  
> cut-over.   These old files are a worry because if I ever had to  
> reconstruct one of the mailboxes, presumably the deleted (I think)  
> messages would all reappear.  Does anyone have any suggestions?
>

you also need to run cyr_expire on the "new_server" to remove the old
expunged mails and deleted folders.

I haven't used replication for backup but I suspect that cyr_expire is
also required your backup servers





--------------------------------------------------------------------------------
M.Menge                                Tel.: (49) 7071/29-70316
Universität Tübingen                   Fax.: (49) 7071/29-5912
Zentrum für Datenverarbeitung          mail:  
michael.menge at zdv.uni-tuebingen.de
Wächterstraße 76
72074 Tübingen



More information about the Info-cyrus mailing list