Last change: 2025-09-10 Marcel Herrguth
As shown on https://youtu.be/P-Pr7Dy6mP8
Attribution back to this GIST is required!

Parts of this script are oriented from https://github.com/zammad/zammad/tree/develop/contrib/backup
Only PostGreSQL is supported; No symlinks are supported

Restoration only works on a pre-installed Zammad installation of the same version (or higher).
During Restore, this script will remove the existing (local) Zammad database without any warning; if it's an external one, ensure it's empty.


COMMAND REFERENCE
- backup: creates a new snapshot and backs up database and storage.
- restore <snapshot>: Restore a given snapshot from your backup. If you omit the snapshot ID, latest will be used.
- list_snapshots: List all available snapshot IDs.
- verify_health <percentage>: Verify the health of your backup repository. If you omit percentage, 100% will be assumed.