is this thing of zero-downtime REALLY REALLY needed, or it's just
your boss getting things more complicated than they need to be ?
in cases such that, i would rsync the mail folders to the new
destination ... the 1st sync would, depending on the mailboxes total
sizes, need a lot of time to run. I would than get the configs ready and
do a 2nd sync, which would run MUCH faster than 1st one. Right after the
2nd sync, i would stop services, give some seconds to everything really
stop, specially dovecot, and after make sure services are completly
stopped (ps auwx | grep is your friend) run rsync 3rd time which, for
sure, would run MUCH faster, matter of few seconds of few minutes, all
depends on how many mailboxes and sizes.
After syncing the folders with services stopped and configs already
pointing to the new places, it would be just a matter of getting
services running again !
Downtime of maximum 3-4 minutes !!!
But watch out ... these steps would make sense only if you're using
Maildir mailbox format ... if you're using mbox, for example, syncing
times would be much longer as any change would require the whole file to
be copied again !!
Em 06/08/13 07:22, Felix Rubio Dalmau escreveu:
Hi all,
I have set up a postfix+dovecot mail server that stores all the mails
under /home mountpoint, and that has been working for half a year. Now I have
bought a new disk and I'd like to move all the existing mail to this new
location. How should I do it, without stopping the postfix service?
I have figured out a strategy:
a) ask postfix to hold every incoming mail in its queue
(postsuper -h ALL)
b) stop dovecot service
c) move the mail folder into its new location
d) update folder locations for postfix and dovecot
e) restart service dovecot, reload postix config and deliver
enqueued mails (postsuper -r ALL)
Do you think it can work?
--
Atenciosamente / Sincerily,
Leonardo Rodrigues
Solutti Tecnologia
http://www.solutti.com.br
Minha armadilha de SPAM, NÃO mandem email
[email protected]
My SPAMTRAP, do not email it