Backing up your mailboxes is a simple as copying your mailbox folder. This article describes how to backup and restore your Postfix mailboxes using the tar command.
To backup the mailbox, type the command below in a terminal window.
tar cvzf mailbox-`date +%F_%H%M`.tar.gz /home/vmail
Replace /home/vmail with the location of your own mailbox.
To restore the mailbox, type the command below in a terminal window.
tar xvzf mailbox.tar.gz -C /
Replace mailbox.tar.gz with the name of your backup file.
Ideally, the Postfix and Dovecot configurations should be documented, or better yet, maintained using a change configuration process. But you can also use the procedure above to backup the /etc
directory although it is not recommended since you may restore your configuration on an updated OS.
Visit the forum to ask for help or to give a comment.
Posted on 5/9/2010 and last updated on 5/9/2010
Filed under Backup , Dovecot , Postfix