Sever software shut down in the middle of the night

This is a newly installed mail-in-a-box in a small business environment with other servers on the network. I am using an external DNS. The status page is mostly green (now) except for warnings related to the external DNS. This may just be a random event, but if anyone has insight into what might have happened it would certainly be helpful.

At about 4:00 am this morning it seems that postfix and dovecot shut down. I was still able to get into the server to look around, but ps showed neither postfix or dovecot were running. The status page also showed the not running. The log showed spamd kicking in for something around 6:00, but that’s it.

Here are obfuscated logs on GoogleDrive from around 4:00 (If you need unobfuscated let me know):
systemlog
maillog

000.000.000.000 is our mail server internal IP
YYYYY is the admin user (part of the path to mailinabox)
USER-00? are individual mail users

I rebooted and everything seemed to come up as it should.

Please let me know any additional information that would help. I didn’t want to flood this with stuff that didn’t really matter.

TIA
Tim

1 Like

Unable to access the logs … please repost to something similar to https://paste.ubuntu.com or https://paste.ee

The timing seems like the daily maintenance period. Both should have restarted after maintenance.

Postfix and Dovecot are stopped prior to taking a backup, and are started again once the backup completes. If the backup was still ongoing (e.g. if you migrated a lot of email and this was the first backup), that would explain it.

3 Likes

Just FYI, the backup process starts at a random minute in the hour from 03:00 if I’m right. You should see future backups starting at the same minute on subsequent days.

@alento: Sorry, didn’t realize the GDrive would have access issues. I was just waking up after 28 hours straight at work and obviously didn’t think it through.

@JoshData: Thanks, that makes sense. It was a new install (migration), thus the 28 hour shift. I’ll keep an eye on it. What process does it use? I want to see if I can figure out if it was still running at that time or if something else might have happened.

Out of curiosity, Is it possible to change the time that the backup fires off that won’t get overwritten with an update? I’m guessing its’ a cron job?

And thanks to you too @latinhypercube.

Backups are performed with duplicity

See comments in \management\backup.py for details of the process.

Thanks @latinhypercube. Once I get caught up on other stuff I’ll have a look.

After a couple of attempts to get backups going, I think the backup chain was borked somehow. That first night when mail was down during the work day, I think the backup was indeed still running. I rebooted the server to get service back and in the process I think duplicity simply got lost in the stack. After additional tries at backups, the Backup page was only showing the first backup and not any subsequent runs. I ended up deleting all of the backups yesterday and let it start over last night.

My mailboxes total about 150gb (we are a prepress shop so large attachments are common). The full backup completed in about 9 hours. I have changed the crontab to midnight (which may get overridden by an update), but even after that, 9 hours would end up well into the work day if it runs on a work night. On my old server, I was able to do a full backup of the data on a snapshot in about 2 hours over the network. It wasn’t encrypted, but it was compressed. I’m guessing the encryption adds significantly to the time?

  • Does this seem like a reasonable amount of time to backup that amount of data, or is something wrong?
  • The server has 4gb RAM and 2 CPUs. Would throwing more resources at it speed things up?
  • Is it possible to run the backup on a snapshot of the LV rather than live so it can run with the server still running? I realize I would be on my own to set it up, but would this screw anything up within MiaB or get blown out by an update? I’m thinking either setting up the snapshot and run the backup independent of MaiB or set up the snapshot in time for MaiB to run its backup.

Sorry this got kind of long. Any additional guidance would be appreciated.

Not sure to be honest. My mail server has only about 5GB of data stored. First full backup took about 7 minutes including writing out to AWS S3 on a 1GB memory droplet from Digital Ocean.

I don’t suppose it is a linear function but 9 hours sounds extreme. Perhaps someone with a comparable data store might comment.

Not sure if it makes a difference, but to clarify, this is a VM running on an in-house server. It’s a bit of an older box, but it’s the same hardware with different VM that hosted my old server.

Hi again. Swinging back around to this topic.

Does anyone have thoughts on how long my initial full backup took (9 hours for 150gb)? The incrementals have been minutes, but they are really small. I haven’t had another full backup yet, but I’m dreading the day that I do. If it is shut down for 9 hours again, I know I’ll be getting phone calls.

Are there alternatives to using duplicity? I have done copies to a backup server from a snapshot before. Would I be getting myself in trouble if I tried to set that up here?

I’m not actually familiar with duplicity as the MiaB auto-installed is the only place I use it.

I have a remote server that downloads the backup files nightly and sends me an email. It reports to me once the beginning of each month that a huge number of files were deleted as it appears duplicity is doing some sort of rotation, the most recent of which was March 8. It’s possible you just did a rotation and if so and it didn’t interfere with users, then maybe you are okay?

Oh, also I was going to add that your use-case may be getting a little beyond what MiaB was intended for, so you may continue to run up against other issues.

You might consider creating a fork for yourself on GitHub so changes to the server can be more in your control.

And, additionally, someone here may be able to help you with considering even a different project, such as IRedMail, mailcow, or Modoboa.

Dovecot has some really great features that I’m not sure if those project support, but sdbox file format, the ability to automagically archive older emails to a slower (HDD) storage location and some other stuffs that would require a lot of changes to MiaB yet make more sense in a larger installation.

@openletter I looked at the others and was almost ready to install Modoboa when I discovered unresolved issues that I didn’t want to work around. And in most cases I have been very happy with MaiB. The space for backups or the mail itself doesn’t concern me that much, it’s the amount of time the software is shut down to create the backups. That’s why I think I’ll try creating a snapshot and create backups from that. Unless someone comes along and says “yeah, that backup’s taking too long . . . here’s why.”