3 1.0 Quick start
Asif Bacchus edited this page 2020-05-24 04:28:08 -06:00

quick-start

Assuming you are running a default set up of mailcow according to the documentation, you just have to run the script and it will find everything on it's own. In particular, the defaults are set as follows:

  • mailcow.conf is located at /opt/mailcow-dockerized/mailcow.conf
  • docker-compose is located at /opt/mailcow-dockerized/docker-compose.yml
  • the log file will be saved in the same directory as the script with the same name as the script but with the extension .log

configuration file

You will need to let the script know how to access your remote repo along with any passwords/keyfiles needed to encrypt data. This is all handled via the plain-text 'configuration details' file. By default, this file is named backup.details. The file itself is fully commented so setting it up should not be difficult. If you need more information, consult page 4.0 in this wiki.

running the script

To get a list of all configuration options with defaults:

./backup.sh --help

To run with defaults:

./backup.sh

To run with a custom log file name and location:

./backup.sh --log /var/log/mailcow_backup.log

To copy a 503 error page to your webroot:

# assuming default NGINX webroot (/usr/share/nginx/html)
./backup.sh -5
# custom webroot
./backup.sh -5 -w /var/www/

Common usage: custom log file and copy 503 to custom webroot

./backup.sh -l /var/log/mailcow_backup.log -5 -w /var/www/

Non-default mailcow location (example: /var/mailcow):

./backup.sh --docker-compose /var/mailcow/docker-compose.yml --mailcow-config /var/mailcow/mailcow.conf

For more configuration options, see the section about script parameters in this wiki.