h3x has asked for the wisdom of the Perl Monks concerning the following question:

I have a tricky scenario on my hands and it involves backing up mails on a dormant server from the active mail server. I have a mail server running Free BSD and squirrel mail and Qmail as the MTA and i want to write a script that will continuously perform back up procedures on the server then transfer the backed up mails (in a tar or .gz) to a second server running the same OS and mail client. Kindly give your ideas and suggestions to do the above.

Replies are listed 'Best First'.
Re: E-mail back-up script in perl
by Anonymous Monk on Mar 06, 2008 at 12:53 UTC
Re: E-mail back-up script in perl
by Anonymous Monk on Mar 06, 2008 at 11:38 UTC
    What does the qmail list say?
Re: E-mail back-up script in perl
by kyle (Abbot) on Mar 06, 2008 at 17:33 UTC

    I suggest you forget about backing up anything Qmail is doing. When you take your backup, there may be something in a queue somewhere, but it will certainly be gone shortly after. Not only that, qmail's files are named based on their inode number (as I recall), so restoring them from backup is straight backward.

    Backup your Squirrel mailboxes as you'd backup any other files.

    I'm not sure why you're interested in "continuously" backing up. You may want hardware that replicates at the block level. It's important to figure out what scenario you're trying to protect against. A constantly updated backup protects against hardware failure, but it's not good for the case where someone deletes something and later regrets it. For that you want snapshots going back in time.