Backups

Credits

Various bits of code, scripts, and procedures were put together with information from John Simpson's qmail.jms1.net website. It's an excellent resource on managing and setting up a Qmail server.

Mirror/backup your vpopmail domains to another Qmail server. Run it through cron and have a hot-backup server ready for action in case your main server crashes.

To mirror the entire /home/vpopmail structure, on the destination server:

rsync -avx --delete -e ssh root@<source_server>:/home/vpopmail /home/

To mirror just a domain, on the destination server::

rsync -avx --delete -e ssh root@<source_server>:/home/vpopmail/domains/<domain> /home/vpopmail/domains

Instructions for setting up public keys so rsync won't require a password.

Automate using cron
Create a script in /usr/local/bin/vpop_rsync, such as:

#!/bin/sh
rsync -avx --delete -e ssh root@<server>:/home/vpopmail/domains/<domain> /home/vpopmail/domains

Make the script executable:

chmod ugo+x /usr/local/bin/vpop_rsync

Create a cron job to run vpop_rsync:

  • Systems with /etc/cron.d (i.e. RedHat, CentOS, etc.)
    Create a text file /etc/cron.d/vpop_rsync:

    # Sync the domain at 3am every night.
    0 3 * * * root /usr/local/bin/vpop_rsync
  • Systems without /etc/cron.d (i.e. FreeBSD):
    Add the command to crontab:

    crontab -e
    0 3 * * * root /usr/local/bin/vpop_rsync

    Refer to the cron page for further details and cron tricks.

Recent Updates

  • 8 months 3 weeks ago
    1.27.2 update
  • 9 months 3 days ago
    Drupal 10/11 config
  • 9 months 5 days ago
  • PHP
    9 months 5 days ago
    PHP 8.3.11 and AlmaLinux
  • 9 months 5 days ago
    New version of Pound