Files
restic-scripts/README.md
2024-06-15 14:12:15 -05:00

1.7 KiB

Restic Scripts

Purpose:

  • Wrap restic with the ability to start/stop Docker containers
  • Send updates to Loki server

Installation

Environment Variables

Put these in ./restic-scripts/.env, which is on the .gitignore list.

Env Variable Description
BACKUP_DIR Directory to back up
RESTIC_REPOSITORY Directory for the restic repository. This is usually on a mount point made from Proxmox
TZ Set to modify the timezone shown in the scheduler

Include in Repo

From a parent repo, add this one as a submodule:

git submodule add https://gitea.john-stream.com/john/restic-scripts

Then add this to the docker-compose.yml file of the parent.

include:
  - restic-scripts/docker-compose.yml

Loki Updates

Updates sent to Loki will have the following labels:

Label Description
host Hostname set by the environment variable HOSTNAME
backup String representing the type of update e.g. backup, prune, forget, or size

Usage

Check snapshots

docker compose exec backup resticprofile snapshots

Dry-run a backup

docker compose exec backup resticprofile --dry-run backup