Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Qmail: users

Backing up qmail server

 

 

Qmail users RSS feed   Index | Next | Previous | View Threaded


marcus at synchromedia

Jun 29, 2009, 1:55 AM

Post #1 of 3 (845 views)
Permalink
Backing up qmail server

Hi,

I'm configuring a backup system for a qmail server. I want to exclude
the mail queue from the backup - if I exclude /var/qmail/queue/*, will
qmail automatically recreate all the subdirectories it needs after a
restore? If not, is there some command to have qmail recreate those
directories, or do I need to build a script for it? Any other advice
about backing up a working qmail setup?

Marcus
--
Marcus Bointon
Synchromedia Limited: Creators of http://www.smartmessages.net/
UK resellers of info[at]hand CRM solutions
marcus[at]synchromedia.co.uk | http://www.synchromedia.co.uk/


ar-djblists at acrconsulting

Jun 29, 2009, 6:54 AM

Post #2 of 3 (766 views)
Permalink
Re: Backing up qmail server [In reply to]

On Monday 29 June 2009, Marcus Bointon wrote:
> I'm configuring a backup system for a qmail server. I want to
> exclude the mail queue from the backup - if I exclude
> /var/qmail/queue/*, will qmail automatically recreate all the
> subdirectories it needs after a restore?

No - but see below.

> If not, is there some
> command to have qmail recreate those directories

Recompiling qmail (make setup check) will do that

> , or do I need to
> build a script for it? Any other advice about backing up a working
> qmail setup?

I think you've already worked out the key fact - that it's tricky (and
often unnecessary) to backup the messages in the queue since they're
tied to inode numbers - but that the rest of /var/qmail is useful.

With a bit more detail you should be able to achieve what you want.
/var/qmail/queue contains these directories:
bounce info intd local lock mess pid remote todo

You need to backup everything that's a directory (some of these have
numbered sub-directories which you need) but not the files within them,
with the exception of the lock directory: You'll need to be able to
restore this, carefully maintaining rights and ownership. Note that
the item "trigger" is in fact a named pipe (FIFO) - if this confuses
your backup program you can just recreate this on restore instead with
mknod, making sure you set the rights and ownership correctly. Finally
the "tcpto" item can be reset at restore-time with the qmail-tcpok
command.

cheers,

Andrew.
--
====================================================================
* Custom email solutions * Systems Administration * Networking
http://www.acrconsulting.co.uk/email/qmail.html
====================================================================


george at montco

Jul 2, 2009, 9:52 AM

Post #3 of 3 (758 views)
Permalink
Re: Backing up qmail server [In reply to]

Try qmqtool

http://jeremy.kister.net/code/qmqtool/

Has some other very useful features as well.


On Jun 29, 2009, at 9:54 AM, Andrew Richards wrote:

> On Monday 29 June 2009, Marcus Bointon wrote:
>> I'm configuring a backup system for a qmail server. I want to
>> exclude the mail queue from the backup - if I exclude
>> /var/qmail/queue/*, will qmail automatically recreate all the
>> subdirectories it needs after a restore?
>
> No - but see below.
>
>> If not, is there some
>> command to have qmail recreate those directories
>
> Recompiling qmail (make setup check) will do that
>
>> , or do I need to
>> build a script for it? Any other advice about backing up a working
>> qmail setup?
>
> I think you've already worked out the key fact - that it's tricky (and
> often unnecessary) to backup the messages in the queue since they're
> tied to inode numbers - but that the rest of /var/qmail is useful.
>
> With a bit more detail you should be able to achieve what you want.
> /var/qmail/queue contains these directories:
> bounce info intd local lock mess pid remote todo
>
> You need to backup everything that's a directory (some of these have
> numbered sub-directories which you need) but not the files within
> them,
> with the exception of the lock directory: You'll need to be able to
> restore this, carefully maintaining rights and ownership. Note that
> the item "trigger" is in fact a named pipe (FIFO) - if this confuses
> your backup program you can just recreate this on restore instead with
> mknod, making sure you set the rights and ownership correctly. Finally
> the "tcpto" item can be reset at restore-time with the qmail-tcpok
> command.
>
> cheers,
>
> Andrew.
> --
> ====================================================================
> * Custom email solutions * Systems Administration * Networking
> http://www.acrconsulting.co.uk/email/qmail.html
> ====================================================================

Qmail users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.