Skip to content

Backup & Restore

dockmesh backs up stack volumes, bind-mounted paths, and optional database dumps to reusable backup targets. Every backup is encrypted with age, versioned, and subject to a retention policy.

Targets are reusable connection configs that backup jobs reference. Create them once under Backups → Targets:

TypeFieldsNotes
LocalDirectory pathOn the dockmesh server filesystem
SMB / NASHost + username + passwordShare list auto-discovered on Test connection
SFTPHost + port + user + key or passwordUses OpenSSH-compatible key formats
WebDAVURL + user + passwordTested against Nextcloud, OwnCloud, Synology
S3Endpoint + bucket + region + access/secretWorks with AWS, MinIO, Backblaze B2, Wasabi

Every dialog has a Test connection button that establishes a live session and reports failures with the actual protocol error.

A job ties a target to a schedule. Open Backups → New job:

  1. Select stacks (or leave blank for all stacks on a host)
  2. Pick a target
  3. Schedule — visual cron builder (every 6h, daily at 02:00, weekly Sunday, etc.) or raw cron
  4. Pre/post hooks — pick a preset (PostgreSQL dump, MySQL dump, Redis BGSAVE) or write a custom shell command
  5. Retention — keep last N, or keep daily/weekly/monthly rotation
  6. Encryption passphrase — required; stored encrypted at rest in the database

For each selected stack:

  • compose.yaml and .env
  • All named volumes (streamed as tar)
  • Bind mounts (tar of the referenced host path)
  • Optional hook output — e.g. a pg_dump file placed next to the volume

Everything is combined into a single <stack>-<timestamp>.tar.age file, encrypted with the job’s passphrase.

Backups → Browse shows every backup file on every target, grouped by stack. Click Restore and dockmesh:

  1. Stops the target stack (if running)
  2. Decrypts and extracts the archive
  3. Replaces named volume contents (with a 24h safety copy retained)
  4. Restarts the stack

You can restore to a different host — pick a destination from the dropdown and dockmesh handles the transfer.

The retention policy runs after every successful job:

  • Keep last N — simplest, rotates after N backups
  • Grandfather-father-son — keep N daily, N weekly, N monthly

Expired backups are deleted from the target. The audit log records every deletion.