Borgmatic
01README
Host agent for borgmatic backups over SSH. Version-aware config rendering (commands: on borgmatic ≥2.0, before_backup: on 1.8–1.9), apply-gated on borgmatic config validate, with install/keygen/timer convergence, on-demand backup/prune/compact/check, and queryable listArchives/info/status. Every mutation is audited on both success and failure.
02Behaviors
@shrug/borgmaticv2026.08.07.1borgmatic.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| host | string | Target host management IP or hostname |
| sshPort | number | SSH port |
fn configure()
Umbrella converge: (optionally) install borgmatic, ensure the borg SSH
fn initRepo(_run?: any)
Create the borg repository if it does not already exist (idempotent via
| Argument | Type | Description |
|---|---|---|
| _run? | any | Test-only: inject a TargetRunner seam |
fn backup(dryRun: boolean, _run?: any)
Run `borgmatic create --stats` now (ad-hoc backup). Records the archive
| Argument | Type | Description |
|---|---|---|
| dryRun | boolean | Pass --dry-run |
| _run? | any | Test-only: inject a TargetRunner seam |
fn prune(_run?: any)
Enforce retention: `borgmatic prune --stats`. Audits the attempt.
| Argument | Type | Description |
|---|---|---|
| _run? | any | Test-only: inject a TargetRunner seam |
fn compact(_run?: any)
Reclaim segment space: `borgmatic compact`. Audits the attempt.
| Argument | Type | Description |
|---|---|---|
| _run? | any | Test-only: inject a TargetRunner seam |
fn check(_run?: any)
Verify repo/archive integrity: `borgmatic check`. Audits the attempt.
| Argument | Type | Description |
|---|---|---|
| _run? | any | Test-only: inject a TargetRunner seam |
fn listArchives(_run?: any)
Snapshot `borgmatic repo-list --json` into the `archives` resource.
| Argument | Type | Description |
|---|---|---|
| _run? | any | Test-only: inject a TargetRunner seam |
fn info(_run?: any)
Snapshot `borgmatic repo-info --json` into the `repoInfo` resource.
| Argument | Type | Description |
|---|---|---|
| _run? | any | Test-only: inject a TargetRunner seam |
fn status(_run?: any)
Composed health probe (read-only): config present+valid? timer
| Argument | Type | Description |
|---|---|---|
| _run? | any | Test-only: inject a TargetRunner seam |
fn restore(_run?: any)
GUARDED restore: `borgmatic extract` of an archive. Destructive to the
| Argument | Type | Description |
|---|---|---|
| _run? | any | Test-only: inject a TargetRunner seam |
Resources
config(infinite)— The rendered+validated borgmatic config on the host (passphrase redacted).
repoInit(infinite)— Result of a repo-create (or idempotent already-exists skip).
backup(infinite)— Record of a borgmatic create (archive name + stats tail).
archives(30d)— Snapshot of repo-list (archives + newest time).
repoInfo(30d)— Snapshot of repo-info (repo size, encryption, cache).
op(infinite)— Record of a prune/compact/check/restore operation.
status(30d)— Composed health: config valid? timer active + next run? last-archive age?
attempt(infinite)— Audit record of a mutation attempt (args + result/error + timestamp). Written on both success and failure.
03Stats
A
93 / 100
Downloads
15
Archive size
33.2 KB
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License1/2partial
no SPDX license declared
- Verified public repository2/2earned
04Platforms
05Labels