Nomploy Nomad Packs

← All packs

backrest v0.1.0

Backup

Backrest — a web UI and orchestrator for restic backups: schedule snapshots, manage repositories and retention, browse and restore files, and get notifications — all from a browser, with restic's fast, encrypted, deduplicated engine underneath. Deployed as a host-networked Nomad service with persistent data, config, and cache volumes.

nomad-pack run backrest --registry nomploy
…or one line (add registry + run)
curl -fsSL https://packs.nomploy.com/install.sh | sh -s -- backrest

Needs nomad-pack on PATH. The script only adds the nomploy registry and runs this pack.

1 task http 9898 4 volumes image garethgeorge/backrest:latest tracks :latest image bumped today
Variables 11
values.hcl

Save as values.hcl, edit, then run:

nomad-pack run backrest -f values.hcl --registry nomploy
# The name of the Nomad job.
job_name = "backrest"

# The Nomad namespace to deploy into.
namespace = "default"

# The datacenters to deploy to.
datacenters = ["*"]

# The Backrest container image. Pin a tag in production.
image = "garethgeorge/backrest:latest"

# Host port for the Backrest web UI (BACKREST_PORT).
port = 9898

# Named volume for Backrest data (/data): the bundled restic binary and its database.
data_volume = "backrest_data"

# Named volume for Backrest config (/config): config.json with your repos and plans.
config_volume = "backrest_config"

# Named volume for the restic cache (/cache).
cache_volume = "backrest_cache"

# Named volume mounted at /userdata to be backed up. Swap for a bind mount to back up real host paths.
sources_volume = "backrest_sources"

# Placement constraints. Pin to the node holding the volumes. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []

# Resources for the Backrest task.
resources = {
    cpu    = 500
    memory = 256
  }
NameTypeDefaultDescription
job_name string
"backrest"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"garethgeorge/backrest:latest"
The Backrest container image. Pin a tag in production.
port number
9898
Host port for the Backrest web UI (BACKREST_PORT).
data_volume string
"backrest_data"
Named volume for Backrest data (/data): the bundled restic binary and its database.
config_volume string
"backrest_config"
Named volume for Backrest config (/config): config.json with your repos and plans.
cache_volume string
"backrest_cache"
Named volume for the restic cache (/cache).
sources_volume string
"backrest_sources"
Named volume mounted at /userdata to be backed up. Swap for a bind mount to back up real host paths.
constraints list
[]
Placement constraints. Pin to the node holding the volumes. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
resources object
{
    cpu    = 500
    memory = 256
  }
Resources for the Backrest task.
Back up this pack

This pack stores data in 4 Docker named volumes: backrest_databackrest_configbackrest_cachebackrest_sources

restic

# Run on the node hosting this pack. Point restic at your repo first:
#   export RESTIC_REPOSITORY="s3:https://<account>.r2.cloudflarestorage.com/<bucket>"
#   export RESTIC_PASSWORD="<repo-password>"
#   export AWS_ACCESS_KEY_ID=<key>  AWS_SECRET_ACCESS_KEY=<secret>
restic backup \
  /var/lib/docker/volumes/backrest_data/_data \
  /var/lib/docker/volumes/backrest_config/_data \
  /var/lib/docker/volumes/backrest_cache/_data \
  /var/lib/docker/volumes/backrest_sources/_data

rclone (sync to S3/R2)

rclone sync /var/lib/docker/volumes/backrest_data/_data backup:<bucket>/backrest_data
rclone sync /var/lib/docker/volumes/backrest_config/_data backup:<bucket>/backrest_config
rclone sync /var/lib/docker/volumes/backrest_cache/_data backup:<bucket>/backrest_cache
rclone sync /var/lib/docker/volumes/backrest_sources/_data backup:<bucket>/backrest_sources

Paths assume the default Docker volume location (/var/lib/docker/volumes). Restore by stopping the job, restoring files into the same volume, and re-running the pack.

Readme

backrest

Backrest — a web UI and orchestrator for restic backups. Schedule snapshots, manage repositories and retention, browse and restore individual files, and get notifications — all from the browser, with restic's fast, encrypted, deduplicated engine underneath.

Single host-networked Nomad service with persistent data, config, and cache volumes.

Deploy

nomad-pack registry add nomploy https://github.com/Nomploy/nomad-packs
nomad-pack run backrest --registry=nomploy

Configure

Variable Default Description
port 9898 Web UI port (BACKREST_PORT).
data_volume backrest_data /data — restic binary + Backrest database.
config_volume backrest_config /configconfig.json with repos and plans.
cache_volume backrest_cache /cache — the restic cache.
sources_volume backrest_sources /userdatathe data to back up. Swap for a bind mount to back up real host paths.
image garethgeorge/backrest:latest Container image. Pin a tag in production.
resources { cpu = 500, memory = 256 } Task resources.

On first run, set an instance ID and admin password, then add a restic repository (local, S3/R2, SFTP, rclone, …) and a backup plan targeting /userdata. To back up real host directories, replace the sources_volume mount with a bind mount. Pairs with the minio or rest-server packs as a restic target. The config/data volumes hold your repo passwords — keep them safe and back them up. Front it with a reverse proxy for TLS. Pin the job to the node holding the volumes with constraints.