I use rsync to migrate the mails beetween my cyrus 2.3.14 server (source) and 2.3.16 cyrus server (target). However I have a little problem.
On the source cyrus server, the mails were stored in /var/spool/cyrus/domain/d/domain_name and the quota and seen/sub files are stored in /var/lib/cyrus/domain/d/domain_name. On the destination cyrus server, the mails were stored in /var/spool/imap/domain_name and the quota and seen/sub files are stored in /var/lib/imap. On the target's /etc/imapd.conf file, I have the defaultdomain set with the value domain_name and the defaultpartition with the value : /var/spool/imap/domain_name.
So I use the following commands :
- *rsync -avt --delete --exclude "cyrus.**" /var/spool/cyrus/domain/d/domain_name cyrus_2.3.16_server:/var/spool/imap/domain/d/domain_name* to migrate the mails
and
- rsync -avt --delete --exclude ".sub" /var/lib/cyrus/domain/d/domain_name/user/ cyrus_2.3.16_server:/var/lib/imap/user* to migrate the seen files.
Then I extract the mailboxes.db from the source server, remove the domain information (cause on the target server I set the defaultdomain and define the defaultpartition) and import it on the target server (ctl_mboxlist -u). To finish, I execute the reconstruct command.
When I check a migrated mailbox (stored in the target server), I got only unread mails. Is there another command or step I have to do or tell me if my method is wrong?
Thank you in advance