5 messages in net.sourceforge.lists.courier-usersRe: [courier-users] Backup plan
FromSent OnAttachments
Noam MeltzerApr 7, 2004 8:44 am 
Sam VarshavchikApr 7, 2004 3:31 pm 
Martijn LievaartApr 8, 2004 12:57 am 
Mitch (WebCob)Apr 21, 2004 11:18 pm 
Lloyd ZusmanApr 22, 2004 2:30 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [courier-users] Backup planActions...
From:Martijn Lievaart (m@rtij.nl)
Date:Apr 8, 2004 12:57:40 am
List:net.sourceforge.lists.courier-users

Noam Meltzer wrote:

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

Hi, For the last couple of month I have been using courier as an IMAP and webmail server, and I'm very pleased of it. Lately, I started to think: "gee, what will happen if my HD will crash... I will lose *everything*".

So, I decided that I want to backup my data. On first look, it seems very simple as I have only one user (me): All I need to do is make one tarball of my Maildir, and that should do the trick. But then, another thought crossed my mind: If the imapd/webmail daemons are running, maybe they access my files somehow? I know that in databases, when you backup using raw mode, you want to stop the database, make the backup, and then start the database again. Does backing up the Maildir of courier is a similar scenario?

In principle, the maildir format is pretty simple and pretty safe. You cannot go to far wrong.

Considerations with databases are different, these are not simple files, but the files making up the databases may be in an inconsistent state. Only together with the database logfiles and only when taken as a snapshot you stand a chance of a working database backup at file level, but don't do that unless you really understand the issues involved in general and for that specific database. Maildir is a good format because it is simple, filebased and always consistent (enough). I think you might want to exclude the tmp directories in any Mailfolder as that is where the mail is written when deliverd, but I'm not completely sure, anyone?

Just tarball your Maildir and you should be fine. OTOH, stopping courier for the backup should also not be a big deal, either your backup MX will store the mail, or the sending MTA will retry later anyhow, so you cannot go wrong with that option as well. I personally do this, just to be sure (and some other considerations, not important here).

Actually, this is a pretty important issue, so maybe some central documentation on backing up a courier installation would be a good idea. Even if it just states, "no problem, just backup any way you like", which I suspect, but cannot say with complete confidence. Any takers?

HTH, M4