Runbook — Restore a Docker volume from tar¶
Use when: a Docker volume is corrupted, accidentally pruned, or you need to recover Forgejo / Vaultwarden / MinIO data.
Warning¶
Vikunja #59 tracks the issue that some volume backups are empty. Always inspect the tar contents before relying on it.
Prerequisites¶
- SSH access
- The volume name (
docker volume ls) - A backup tar in
/opt/backups/volumes/<volume>_<date>.tar.gz
Steps¶
-
Inspect the tar — confirm it has real data
If the tar is < 100 bytes or lists no real files, stop. The backup is broken — escalate to João. -
Stop every container using the volume
-
Snapshot the current bad state
-
Wipe the volume
-
Restore from tar
-
Restart the containers
-
Verify the app reads the restored data.
Common volumes¶
| Volume | Container | Critical? |
|---|---|---|
forgejo_forgejo-data |
forgejo | Yes — all git repos |
vaultwarden_data |
vaultwarden | Yes — all secrets |
gamine_media-storage |
gamine-minio | Yes — uploads |
infra-postgres_data |
infra-postgres | Yes — most apps |
vikunja_data |
vikunja | Yes — task history |
Rollback¶
If restore made things worse, repeat steps 4–6 with the _predeath_ tar from step 3.