Make a backup of the files
First create an explicit name for the backup file, e.g.:
BACKUPFILE="backup-$(date +%Y%m%d%H%M%S).tar"
- tar cvf $BACKUPFILE /etc/
- tar rvf $BACKUPFILE /var/imap/
- tar rvf $BACKUPFILE /var/spool/imap
- tar rvf $BACKUPFILE /var/spool/postfix/
- tar rvf $BACKUPFILE /var/lib/ldap
- tar rvf $BACKUPFILE /var/lib/pgsql/
- tar rvf $BACKUPFILE /var/named/
- tar rvf $BACKUPFILE /var/www/htdocs/freebusy/
- tar rvf $BACKUPFILE /usr/sieve/
- tar rvf $BACKUPFILE /usr/ssl/
If you enter all directories in a single command line, you can use the option 'z' to make
tar compress the archive with gzip when creating it. Do not
forget to adapt the file name accordingly (.tar.gz or .tgz). For additional information, please
refer to the man page man tar.
Possible problem: tar is capable of handling files up to 2GB. Depending on the amount and size of mailboxes, this limit might be reached. In this case you have to create more than one backup file.