v3.3.2 9697f9d

backups.md RawHistoryFolder

Backups Configuration

Gordon has two backup flows:

  • Database backups: PostgreSQL logical dumps via pg_dump, stored on the local filesystem.
  • Volume backups: best-effort filesystem archives of Gordon-managed named volumes, uploaded to S3. Administrative bind mounts are operator-owned host paths and are never archived.

Backups are identified by app, service, and the declared database or volume (see Apps). Domains are routing addresses and are never a backup identity.

Database backups

[backups.databases]
enabled = true
schedule = "daily"
storage_dir = "~/.gordon/backups"

[backups.databases.retention]
hourly = 24
daily = 7
weekly = 4
monthly = 12
Key Default Description
backups.databases.enabled false Enables PostgreSQL backup service wiring
backups.databases.schedule "daily" Scheduler preset: hourly, daily, weekly, monthly
backups.databases.storage_dir "" Root backup directory; defaults to {server.data_dir}/backups
backups.databases.retention.* 0 Number of backups to keep per DB and schedule tier

Volume backups to S3

[backups.volumes]
enabled = true
interval = "24h"
compression = "gzip"
timeout = "2h"
max_concurrency = 2
helper_image = "alpine:3.20"

[backups.volumes.s3]
bucket = "gordon-backups"
region = "eu-west-3"
prefix = "prod/gordon"
# endpoint = "https://s3.example.com"
# path_style = false
# sse_algorithm = "AES256"
# sse_kms_key_id = ""
# storage_class = "ONEZONE_IA"

[backups.volumes.retention]
keep = 14
Key Default Description
backups.volumes.enabled false Enables automatic volume archives
backups.volumes.interval "24h" Interval between scheduled runs
backups.volumes.compression "gzip" gzip or zstd; helper image must provide the tool
backups.volumes.timeout "2h" Per-volume archive/upload timeout
backups.volumes.max_concurrency 2 Maximum concurrent volume backups
backups.volumes.helper_image "alpine:3.20" Helper container image used for tar/compression
backups.volumes.s3.bucket "" Required when volume backups are enabled
backups.volumes.s3.region "" Required when volume backups are enabled
backups.volumes.s3.prefix "" Object key prefix
backups.volumes.s3.endpoint "" Optional S3-compatible endpoint
backups.volumes.s3.path_style false Use path-style addressing for S3-compatible storage
backups.volumes.s3.sse_algorithm "" Server-side encryption sent with each upload, such as AES256
backups.volumes.s3.sse_kms_key_id "" KMS key ID for aws:kms encryption
backups.volumes.s3.storage_class "" Storage class sent with each upload, such as STANDARD_IA (AWS) or ONEZONE_IA (Scaleway One Zone); empty uses the bucket default
backups.volumes.retention.keep 14 Completed archives to keep per app + volume

Volume backup objects are stored under the canonical app name:

<prefix>/apps/<app>/volumes/<volume>/<timestamp>-<id>.tar.gz   # gzip
<prefix>/apps/<app>/volumes/<volume>/<timestamp>-<id>.tar.zst  # zstd

Objects written by earlier versions under a domain prefix are not read or migrated: back them up and re-run the app's volume backups if you need them in the current layout.

Notes

  • Volume backups archive the app's declared volumes that its backup declaration references.
  • Bind mounts, tmpfs mounts, anonymous volumes, and undeclared volumes are never backed up.
  • Database backups archive the app's declared PostgreSQL databases that its backup declaration references.
  • Only volumes listed in a service's backup.volume are archived. Leave caches and rebuildable data (CI runner state, build caches) out of that list.
  • Stored size is roughly retention.keep × the compressed size of each backed-up volume.
  • Live volume archives are best-effort; consistency requires application quiesce, pause, or stop.
  • Automated volume restore is not part of the MVP.
  • Snapshots are not generic across Docker/Podman volumes and require backend-specific support such as ZFS, Btrfs, LVM, EBS, or a snapshot-capable volume driver.
  • S3 credentials should come from the environment, shared config, instance role, or Gordon secret conventions. Use least-privilege IAM for the configured prefix.
source
1# Backups Configuration
2
3Gordon has two backup flows:
4
5- **Database backups**: PostgreSQL logical dumps via `pg_dump`, stored on the local filesystem.
6- **Volume backups**: best-effort filesystem archives of Gordon-managed named volumes, uploaded to S3. Administrative bind mounts are operator-owned host paths and are never archived.
7
8Backups are identified by app, service, and the declared database or volume
9(see [Apps](../config/apps.md)). Domains are routing addresses and are never a
10backup identity.
11
12## Database backups
13
14```toml
15[backups.databases]
16enabled = true
17schedule = "daily"
18storage_dir = "~/.gordon/backups"
19
20[backups.databases.retention]
21hourly = 24
22daily = 7
23weekly = 4
24monthly = 12
25```
26
27| Key | Default | Description |
28|---|---:|---|
29| `backups.databases.enabled` | `false` | Enables PostgreSQL backup service wiring |
30| `backups.databases.schedule` | `"daily"` | Scheduler preset: `hourly`, `daily`, `weekly`, `monthly` |
31| `backups.databases.storage_dir` | `""` | Root backup directory; defaults to `{server.data_dir}/backups` |
32| `backups.databases.retention.*` | `0` | Number of backups to keep per DB and schedule tier |
33
34## Volume backups to S3
35
36```toml
37[backups.volumes]
38enabled = true
39interval = "24h"
40compression = "gzip"
41timeout = "2h"
42max_concurrency = 2
43helper_image = "alpine:3.20"
44
45[backups.volumes.s3]
46bucket = "gordon-backups"
47region = "eu-west-3"
48prefix = "prod/gordon"
49# endpoint = "https://s3.example.com"
50# path_style = false
51# sse_algorithm = "AES256"
52# sse_kms_key_id = ""
53# storage_class = "ONEZONE_IA"
54
55[backups.volumes.retention]
56keep = 14
57```
58
59| Key | Default | Description |
60|---|---:|---|
61| `backups.volumes.enabled` | `false` | Enables automatic volume archives |
62| `backups.volumes.interval` | `"24h"` | Interval between scheduled runs |
63| `backups.volumes.compression` | `"gzip"` | `gzip` or `zstd`; helper image must provide the tool |
64| `backups.volumes.timeout` | `"2h"` | Per-volume archive/upload timeout |
65| `backups.volumes.max_concurrency` | `2` | Maximum concurrent volume backups |
66| `backups.volumes.helper_image` | `"alpine:3.20"` | Helper container image used for tar/compression |
67| `backups.volumes.s3.bucket` | `""` | Required when volume backups are enabled |
68| `backups.volumes.s3.region` | `""` | Required when volume backups are enabled |
69| `backups.volumes.s3.prefix` | `""` | Object key prefix |
70| `backups.volumes.s3.endpoint` | `""` | Optional S3-compatible endpoint |
71| `backups.volumes.s3.path_style` | `false` | Use path-style addressing for S3-compatible storage |
72| `backups.volumes.s3.sse_algorithm` | `""` | Server-side encryption sent with each upload, such as `AES256` |
73| `backups.volumes.s3.sse_kms_key_id` | `""` | KMS key ID for `aws:kms` encryption |
74| `backups.volumes.s3.storage_class` | `""` | Storage class sent with each upload, such as `STANDARD_IA` (AWS) or `ONEZONE_IA` (Scaleway One Zone); empty uses the bucket default |
75| `backups.volumes.retention.keep` | `14` | Completed archives to keep per app + volume |
76
77Volume backup objects are stored under the canonical app name:
78
79```text
80<prefix>/apps/<app>/volumes/<volume>/<timestamp>-<id>.tar.gz   # gzip
81<prefix>/apps/<app>/volumes/<volume>/<timestamp>-<id>.tar.zst  # zstd
82```
83
84Objects written by earlier versions under a domain prefix are not read or
85migrated: back them up and re-run the app's volume backups if you need them in
86the current layout.
87
88## Notes
89
90- Volume backups archive the app's declared volumes that its backup declaration references.
91- Bind mounts, tmpfs mounts, anonymous volumes, and undeclared volumes are never backed up.
92- Database backups archive the app's declared PostgreSQL databases that its backup declaration references.
93- Only volumes listed in a service's `backup.volume` are archived. Leave caches and rebuildable data (CI runner state, build caches) out of that list.
94- Stored size is roughly `retention.keep` × the compressed size of each backed-up volume.
95- Live volume archives are best-effort; consistency requires application quiesce, pause, or stop.
96- Automated volume restore is not part of the MVP.
97- Snapshots are not generic across Docker/Podman volumes and require backend-specific support such as ZFS, Btrfs, LVM, EBS, or a snapshot-capable volume driver.
98- S3 credentials should come from the environment, shared config, instance role, or Gordon secret conventions. Use least-privilege IAM for the configured prefix.
99
100## Related
101
102- [App Manifest](./apps.md)
103- [CLI Backup Command](../cli/backup.md)
104- [Configuration Reference](./reference.md)

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 7

Tags 106

↑↓ moveenter openesc close