Unpredictable results from imapsync runs
Jorey Bump
list at joreybump.com
Mon Nov 3 13:50:49 EST 2008
Ciprian Marius Vizitiu (GBIF) wrote, at 11/03/2008 01:04 PM:
> I'm trying to migrate a small 120GB IMAP store from a 32 bit Cyrus 2.2.12 on
> RHEL4 to a 64 bit Cyrus 2.3.7 running on RHEL5.
>
> Multiple test runs of imapsync on a 4.2 GB folder will result in annoying
> errors e.g. one of the destinations will show some extra 5 unread messages
> (in one folder) and/or 2 messages missing in another =:-o ... No easy way to
> predict which folder will be affected and I'm sure nobody's been messin'
> with the affected test folders.
>
> A scan of the logs left me empty handed so any hints would be appreciated.
> o:-)
It's been a few years since I used imapsync, but I remember struggling
to get the command line options just right. What command are you using?
Ultimately, I scripted it, and here's an excerpt from an early test:
#!/bin/sh
# assuming user/password matches on both hosts
USER=bob
SECRET=secretpass
HOST1=old.example.net
HOST2=new.example.net
echo "Pass 1 (transfer INBOX, only):"
imapsync \
--host1 $HOST1 --user1 $USER --password1 $SECRET --ssl1 --folder
INBOX --expunge --expunge1 \
--host2 $HOST2 --user2 $USER --password2 $SECRET --ssl2 --delete2
--expunge2
Eventually, this involved into a much more complicated script that
enabled me to migrate my entire UW-IMAP store, so a lot of it will be
irrelevant here. The trick was getting the expunge & delete options
right, in order to get the most rsync-like behaviour. Nonetheless, I had
a bit of manual cleanup afterwards. You'll want to finetune this on a
dummy account, and make use of the --dry option to get an idea of what
will happen. As always, YMMV, so make backups and test on copies.
More information about the Info-cyrus
mailing list