postfix-users October 2010 archive
Main Archive Page > Month Archives  > postfix-users archives
postfix-users: Backup /var/spool/postfix & restoring

Backup /var/spool/postfix & restoring

From: sunhux G <sunhux_at_nospam>
Date: Fri Oct 22 2010 - 09:33:23 GMT
To: postfix-users@postfix.org

Hi

Suppose before I delete away mails (postsuper -d ...),
I backup all the files in the queue directories below:

[root@postfix]# postconf -d | grep -i dir | grep -i que
queue_directory = /var/spool/postfix

To restore these queue files to another server & read these mails,
what are the steps & commands involved?

[root@postfix]# pwd
/var/spool/postfix
[root@postfix]# ls -l
drwx------ 2 postfix root 1085440 Oct 22 17:28 active
drwx------ 2 postfix root 4096 Oct 22 17:27 bounce
drwx------ 2 postfix root 4096 Apr 1 2010 corrupt
drwx------ 18 postfix root 4096 Apr 1 2010 defer
drwx------ 18 postfix root 4096 Apr 1 2010 deferred
drwx------ 2 postfix root 4096 Apr 1 2010 flush
drwx------ 2 postfix root 36864 Oct 22 17:26 hold
drwx------ 2 postfix root 2125824 Oct 22 17:28 incoming
drwx-wx--- 2 postfix postdrop 4096 Oct 22 13:10 maildrop
drwxr-xr-x 2 root root 4096 Apr 1 2010 pid
drwx------ 2 postfix root 4096 Apr 9 2010 private

2nd question:
=========
Instead of using "postsuper -d queue_id" to delete say bounce mails,
can I just do it at OS Unix level using " rm bounce/* " ?

Thanks
U