Press "Enter" to skip to content

How to Backup / Restore Linux Mail Server (Postfix mailboxes) using command

Do you want to Backup / Restore Linux Mail Server (Postfix mailboxes) using command?

Here’s are the easy step-by-step how to Backup / Restore Linux Mail Server (Postfix mailboxes) using 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.