Re: syncing mail by simply syncing the filesystem

Subject: Re: syncing mail by simply syncing the filesystem

Date: Sat, 12 Jun 2010 12:04:44 -0400

To: Christoph Groth, notmuch@notmuchmail.org

Cc:

From: Jesse Rosenthal


Hi Christoph,

On Sat, 12 Jun 2010 17:47:07 +0200, Christoph Groth <cwg@falma.de> wrote:
> > notmuch dump > nm_dump
> > unison
> > notmuch restore nm_dump
> 
> This might actually be the perfect solution, if notmuch is fast enough
> to dump and restore the tags in a few seconds.

Well, it's a bit slower than that. Restoring will be more in the
multiples of tens of seconds (though perhaps less if you're using
searches much more than tags). If you're only doing it once in a while,
it'll be okay (especially since it'll pale next to the speed of
unison-ing maildirs), but it could get to be a bit of a pain.

I was thinking about how to cut this down in a previous email exchange
on the list:

id:87aaru5yi2.fsf@jhu.edu

(http://mid.gmane.org/87aaru5yi2.fsf@jhu.edu)

The key part is that if I think restore (which is what takes more time)
leaves unmentioned messages as they are, so you can run it on a diff, so
something like:

nm dump desktop>desktop-dump; nm dump laptop>laptop-dump; 
diff laptop-dump desktop | grep "^>" | etc...

So when you restore, you'd only be restoring the changes, and it would
drop to a second or two. If you're scripting all the other stuff
together with unison, this could be part of the script as well.

Anyway, this is all rather raw -- my own use-cases haven't made it
necessary to do anything more than spout off on the mailing list about
it.

Best,
Jesse



Thread: