v2.30.0-pre5 7568a1c

backup.md RawHistoryFolder

Backup Command

Manage backups for database attachments.

gordon backups

gordon backups <subcommand>

Subcommands:

  • list [domain] - List backups globally or for one domain
  • run <domain> [--db <name>] - Trigger an immediate backup
  • detect <domain> - Detect supported databases for a domain
  • status - Show backup status across domains

Backup commands work both locally and remotely.

  • Local mode (no --remote) executes backups through in-process services.
  • Remote mode uses the admin API on the target instance.

gordon backups run <domain> auto-selects the database only when exactly one supported DB attachment is detected. If multiple DB attachments are present, pass --db <name>.

In normal usage, configure remotes once (gordon remotes ...) and run backup commands without per-command remote flags.

Examples

# List all backups
gordon backups list
gordon backups list --json

# List backups for one domain
gordon backups list app.example.com

# Trigger backup (auto-detect when exactly one DB attachment exists)
gordon backups run app.example.com

# Trigger backup for specific attachment name
gordon backups run app.example.com --db postgres

# Detect DB attachments
gordon backups detect app.example.com

# Status summary
gordon backups status

JSON Output

gordon backups list supports --json for machine-readable output.

gordon backups list --json
[
  {
    "domain": "app.example.com",
    "db": "postgres",
    "status": "completed",
    "started_at": "2026-03-13T09:45:00Z",
    "backup_id": "backup_20260313_094500"
  }
]

Output Columns

list

<domain>\t<db>\t<status>\t<started_at>\t<backup_id>

detect

<name>\t<type>\t<host>\t<port>\t<image>

status

<domain>\t<db>\t<status>\t<started_at>

run

<domain>\t<db>\t<status>\t<started_at>\t<backup_id>\t<size_bytes>

Required Permissions

  • Read operations (list, status, detect) require admin:status:read.
  • run requires admin:config:write.
source
1# Backup Command
2
3Manage backups for database attachments.
4
5## gordon backups
6
7```bash
8gordon backups <subcommand>
9```
10
11Subcommands:
12
13- `list [domain]` - List backups globally or for one domain
14- `run <domain> [--db <name>]` - Trigger an immediate backup
15- `detect <domain>` - Detect supported databases for a domain
16- `status` - Show backup status across domains
17
18> Backup commands work both locally and remotely.
19>
20> - Local mode (no `--remote`) executes backups through in-process services.
21> - Remote mode uses the admin API on the target instance.
22>
23> `gordon backups run <domain>` auto-selects the database only when exactly one supported DB attachment is detected. If multiple DB attachments are present, pass `--db <name>`.
24
25In normal usage, configure remotes once (`gordon remotes ...`) and run backup commands without per-command remote flags.
26
27## Examples
28
29```bash
30# List all backups
31gordon backups list
32gordon backups list --json
33
34# List backups for one domain
35gordon backups list app.example.com
36
37# Trigger backup (auto-detect when exactly one DB attachment exists)
38gordon backups run app.example.com
39
40# Trigger backup for specific attachment name
41gordon backups run app.example.com --db postgres
42
43# Detect DB attachments
44gordon backups detect app.example.com
45
46# Status summary
47gordon backups status
48```
49
50## JSON Output
51
52`gordon backups list` supports `--json` for machine-readable output.
53
54```bash
55gordon backups list --json
56```
57
58```json
59[
60  {
61    "domain": "app.example.com",
62    "db": "postgres",
63    "status": "completed",
64    "started_at": "2026-03-13T09:45:00Z",
65    "backup_id": "backup_20260313_094500"
66  }
67]
68```
69
70## Output Columns
71
72### list
73
74```text
75<domain>\t<db>\t<status>\t<started_at>\t<backup_id>
76```
77
78### detect
79
80```text
81<name>\t<type>\t<host>\t<port>\t<image>
82```
83
84### status
85
86```text
87<domain>\t<db>\t<status>\t<started_at>
88```
89
90### run
91
92```text
93<domain>\t<db>\t<status>\t<started_at>\t<backup_id>\t<size_bytes>
94```
95
96## Required Permissions
97
98- Read operations (`list`, `status`, `detect`) require `admin:status:read`.
99- `run` requires `admin:config:write`.
100
101## Related
102
103- [CLI Commands](./index.md)
104- [Backups Configuration](../config/backups.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