[Dovecot] Dovecot "sleep" for short snapshots
Making consistent backups from Dovecot with mdbox requires a snapshoted filesystem with (at least) a short Downtime for Dovecot.
I'd like to avoid killing several thenthousand IMAP-sessions for 60 seconds. Users don't like that... And the admin dislakes that too...
What about a "short sleep" mechanism for Dovecot, where all writes are finished and new writes are easily delayed?
I'd like to following process:
*) "doveadm sleep" puts Dovecot in sleep-Mode: -- All existing writes are finished (before "doveadm sleep" is allowed to exit) -- All new writes are simply delayed -- All readonly-operations could work normally, so users can fetch and read mails
*) The the admin can create a LVM-/SAN-snapshot of the filesystems
*) "doveadm unsleep" will finish the magic
Overall the whole process will take just some seconds.
Users will recognize a simple write-delay, but they can work normally and the aren't unconnected at all. If the snapshot is really fast the users won't recognize the whole situation at all.
Peer
-- Heinlein Support GmbH Schwedter Str. 8/9b, 10119 Berlin
http://www.heinlein-support.de
Tel: 030 / 405051-42 Fax: 030 / 405051-19
Zwangsangaben lt. §35a GmbHG: HRB 93818 B / Amtsgericht Berlin-Charlottenburg, Geschäftsführer: Peer Heinlein -- Sitz: Berlin
On 12/15/2012 1:52 AM, Peer Heinlein wrote:
Making consistent backups from Dovecot with mdbox requires a snapshoted filesystem with (at least) a short Downtime for Dovecot.
I'd like to avoid killing several thenthousand IMAP-sessions for 60 seconds. Users don't like that... And the admin dislakes that too...
Are you sure it is necessary? I'm not very familiar with mdbox, but given the rundown on the wiki, it looks as though it should be very resilient to snapshots even mid-write. With fs-freeze and the nature of bulk writes, I suspect it should be fine. At worst, it might need to regain sanity off the backup indexes. Since file rewrites are done during the purge script, I'd definitely not do snapshots during the purge.
The last I checked, the fs-freeze api isn't complete. It would make more sense for dovecot to work with that structure once it is completed (allowing fs-freeze to inform dovecot that the fs will be freezing/unfreezing).
Jack
participants (2)
-
Jack Bates
-
Peer Heinlein