[SWLUG] rsync & Maildir

Neil Greenwood neil.greenwood.lug at gmail.com
Wed Aug 16 07:39:49 UTC 2006


On 11/08/06, Foeh Mannay <swlug at wormtail.co.uk> wrote:
>
> Jonathan Wright wrote:
> > You could try something like:
> >
> > find ~/Maildir -type f -mmin -60 > /tmp/$(date +%Y%m%d%H)
> > rsync --archive --files-from=/tmp/$(date +%Y%m%d%H) from:/path to:/path
> >
> > (-mmin means include only those that have been modified within the
> > last 60 minutes)
> >
> Hi,
>
> I thought about doing that, and only synching if the files were younger
> than an hour, but:
>
> a) It won't remove mails from one server when they are deleted on the
> other
>
> and
>
> b) If a synch gets missed due to prolonged outage, the files that would
> have been synched up get ignored in the later passes.
>
> Cheers,
>
> Foeh
>

You could try something like unison instead of rsync. It uses rsync under
the hood IIRC, but it will cope with things like deleting in one place, etc.

I'm not sure if it can be run from a cron job, since when I used it last it
needed console input, but I vaguely recall command-line options to supply
answers to these questions.

HTH

Cheers,
Neil.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/swlug/attachments/20060816/c9ed7a82/attachment.html>


More information about the Swlug mailing list