MailcowBackup Versions Save

Script to backup/restore Mailcow and the host system using borgbackup. Handles 503 error page generation, mailflow stop/restart, SQL database dump, borg backup and prune and integrates with Logwatch for easy monitoring.

MailcowBackupV4.0.0

1 year ago
  • Script supports both Docker-Compose v1 and v2 since v2 is now the recommended version for Mailcow.
    • compose version is auto-detected (in 99% of cases)
  • added version display to command-line switches as per request
  • clean-up of various error-handling loops

As always, let me know if you run into any issues or have any suggestions!

MailcowBackupV3.5.1

3 years ago

BUGFIX to version 3.5

  • erroneous spaces were added to the details file by accident (auto-format), corrected in this release :-)

Use this instead of Version 3.5

MailcowBackupV3.5

3 years ago

Bugfixes and customization features. Thx to @mason-xx for the suggestions!

  • ability to turn off ANSI log file colourization (issue #9)
  • added variable to details file that specifies a custom SSH port for borg remote server (issue #9)
  • cmd-line parameter to specify non-default borg path (issue #10)
  • fixed possible issues with command aliases for cp and cd script commands
  • fixed some typos in various comments
  • fixed log file bug where colour names were printed instead of the colour being applied

MailcowBackupV3.1.1

3 years ago

Logwatch script update, documentation updates

  • update Logwatch script to scan for newer log file messages
  • fix misleading comments in backup.details regarding the necessity for specifying extra locations
  • update sample xtraLocations

MailcowBackupV3.1

3 years ago
  • change borg cmd common-options order for compatibility across versions (thanks to @lluis!)

MailcowBackupV3.0

3 years ago
  • fixed a few minor bugs in v2.0 backup script related to parameter shifting (nothing operational)
  • added compression parameter as suggested by @shaneonabike (85e34c73a3e02057319580eeed448967e5f9c442)
  • NEW RESTORE SCRIPT!
    • suggested by @RavenDK83
    • automates restoring an extracted borg backup archive to a fresh mailcow installation
    • let me know if you want any other features added to this script

MailcowBackupV2.0

3 years ago
  • switch to POSIX-compliant script and away from BASH (better portability)
  • remove esoteric error codes, more verbose errors in the log file
  • update script handling of parameters
  • remove detection of mailcow config files, rely on parameter input (more reliable)
  • switch config details file to INI style so that it isn't dependant on spacing anymore (also allows comments!)

Let me know if there are any issues still lingering from the older 1.x BASH-based script line. I hope this helps you out!

MailcowBackupV1.5.1

4 years ago

Fixes (minor):

  • Erroneous reports of error 103 & 104 despite containers all restarting properly (FIXED)
  • Version tagging brings this repo in-line with my private repo

Special thx to @Ry3nINaToR for pointing out the erroneous error report!

MailcowBackupV1.5

5 years ago
  • quoted all path variables to prevent expansion errors if paths contain spaces
  • fixed spacing error resulting in logwatch not reporting certain log entries
  • fixed sample file and all documentation wording to avoid confusion regarding SSH key password and borg key password (thx to @fernandodrf for pointing it out in the NextCloudBackup script)
  • suggested no SSH key password in documentation when running script as cron and explained reasoning

MailcowBackupV1.1.1

5 years ago

Fixed error where timestamps didn't update in the log file.