Unpredictable results from imapsync runs

Ciprian Marius Vizitiu cvizitiu at gbif.org
Mon Nov 3 14:12:40 EST 2008


Hi Jorey,

Jorey Bump wrote:

> 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?

For my first attempt(s) I've used:

imapsync --syncinternaldates --host1 aaa.bbb --host2 192.168... 
--authuser1 cyrus --password1 XXX --authuser2 cyrus --password2 "ZZZ" 
--subscribe --user1 username --user2 username --ssl1 --ssl2 --folderrec 
INBOX --fastio1 --fastio2

> 
> 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

I'm not exactly sure I want or have to do "expunge". I'm doing my best 
to keep the original as... "intact" as possible. :-)

> 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.

I'm not at all sure about "delete", like I said I want to keep the source.

Mean time I've discovered that multiple runs will eventually bring the 
"Seen" in sync but I'm still puzzled by the mismatch of the message 
numbers. =:-o

I've got one folder for which a run like:

imapsync --syncinternaldates --host1 aaa.bbb --host2 192.168 --authuser1 
cyrus --password1 XXX --authuser2 cyrus --password2 "WWW" --subscribe 
--user1 username --user2 username --ssl1 --ssl2 --folderrec 
INBOX.smth.trouble --fastio1 --fastio2

produces a result like

++++ Calculating sizes ++++
 From Folder [INBOX.smth.trouble]                Size: 181794267 
Messages:   819
Total size: 181794267
Total messages: 819
Time : 2 s
++++ Calculating sizes ++++
To   Folder [INBOX.smth.trouble]                Size: 181783200 
Messages:   817
Total size: 181783200
Total messages: 817
Time : 1 s

... so there it is: one folder has two more messages, why are they 
ignored? :-o Of course the report says:

++++ Statistics ++++
Time                   : 12 sec
Messages transferred   : 0
Messages skipped       : 817
Total bytes transferred: 0
Total bytes skipped    : 181783200
Total bytes error      : 0
Detected 0 errors



More information about the Info-cyrus mailing list