Koozali.org: home of the SME Server

Best way to stop inbound/outbound emails during backup operation?

Offline pizzaco

  • **
  • 53
  • +0/-0
I need to migrate from 7.6 to 8.0. In order to prevent loss of emails, duplicates, etc., my original plan was to unplug both network cables and do a backup to USB device from the console. For some reason that function is not creating the file on targer device (see http://forums.contribs.org/index.php?topic=49779).

As a work around, I want to do a "Backup to Desktop" from Server Manager, put the file on a memory stick, and then do a restore from USB as part of a clean install on 8.0. Of course, doing this means leaving the LAN side connected to the network during the backup and having the possiblity of emails being sent or retrieved and getting missed by the backup.

I'm thinking of stopping the SMTP, POP3, and IMAP (and their secure counterparts) deamons to disable email during the backup. Is this a good approach? If so, what is the recommended way to shut them down?

Thanks.




Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: Best way to stop inbound/outbound emails during backup operation?
« Reply #1 on: April 29, 2013, 06:52:01 PM »
are you migrating HW too?

Offline pizzaco

  • **
  • 53
  • +0/-0
Re: Best way to stop inbound/outbound emails during backup operation?
« Reply #2 on: April 29, 2013, 07:26:20 PM »
Just a software upgrade. I do plan to swap out the hard drive, just as a way of keeping the old software/data intact in case something goes drastically wrong with the upgrade.

If changing hardware would help, I do have another box I could move to.

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: Best way to stop inbound/outbound emails during backup operation?
« Reply #3 on: April 29, 2013, 07:51:12 PM »
If changing hardware would help, I do have another box I could move to.

in this case, use Affa (http://wiki.contribs.org/Affa), works flawlessy

Offline pizzaco

  • **
  • 53
  • +0/-0
Re: Best way to stop inbound/outbound emails during backup operation?
« Reply #4 on: April 29, 2013, 08:50:21 PM »
Thanks. Will it work OK going from 7.6 on the exiting server to 8.0 on the backup and then "rising"? 

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: Best way to stop inbound/outbound emails during backup operation?
« Reply #5 on: April 29, 2013, 08:51:31 PM »
yes, of course.. I did it many times, no problem at all

Offline pizzaco

  • **
  • 53
  • +0/-0
Re: Best way to stop inbound/outbound emails during backup operation?
« Reply #6 on: April 29, 2013, 08:57:27 PM »
Good. Is there anyway to handle emails that are being sent/received during the backup and before the rise? For example, what would happen to emails #1 and #2 in the following example?

1. Backup starts.
2. User A send email #1 to to user B.
3. Backup ends (but primary is not shut down yet).
4. User A sends email #2 to user B.
5. Primary server turned off a short time after backup ends.
6. Rise performed.
7. User B attempts to POP emails.


Offline pizzaco

  • **
  • 53
  • +0/-0
Re: Best way to stop inbound/outbound emails during backup operation?
« Reply #8 on: April 29, 2013, 09:17:54 PM »
Excellent! Thanks!

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Best way to stop inbound/outbound emails during backup operation?
« Reply #9 on: April 30, 2013, 12:44:33 AM »
I'm thinking of stopping the SMTP, POP3, and IMAP (and their secure counterparts) deamons to disable email during the backup. Is this a good approach?

Yes not a bad idea.

Quote
If so, what is the recommended way to shut them down?

This should work:

for s in qpsmtpd sqpsmtpd  imap pop3 imaps pop3s
do
  service $s stop
done