Restoring mailcow backups made by the backup script in this git repo is very much like doing a migration between servers. The notable exception is that the SQL database is restored from a dump file instead of straight-copied. The majority of these instructions will discuss a semi-automated restore using the new
restore.sh script. If you want to do a fully manual restore, please refer to page 8.3.1.
First off, please remember to run everything as root! This will allow borg to restore files with proper permissions, ensure that docker doesn’t run into any problems and generally make your life easier.
The basic restore process is as follows:
Download (‘extract’) the borg backup archive you want to restore from your remote repository to a local directory.
Basic first-install of mailcow:
- Download mailcow git repo
- Run `generate.sh` to create configuration, CA list and snake-oil certificates
Copy configuration files from restored backup to mailcow directory (i.e. /opt/mailcow-dockerized):
- customization files (usually in data/conf/…)
Start mailcow normally once to generate default configurations and volumes.
Browse to mailcow admin panel and/or SOGo (front page) to verify everything is working with the defaults and the install is working before data restore.
restore.shscript to restore data.
If this overview is enough for you to figure things out, then you can get started. Remember, you can run the restore script with the
--help parameter for a quick overview on how to use it:
If you need a little more guidance, the following pages will go through each step.