@swordev/arestic-cli
v1.3.0
Published
CLI tool for automatic restic backups
Downloads
3
Readme
arestic-cli
CLI tool for automatic restic backups.
Features
- Config profiles
- Repositories
- Backups
- Forgets
- File config JSON/YAML format
- Auto init repositories
- Path globs
- Custom snapshot date by path regex capture
- Logging file
- Cross-platform
Install
npm install -g @swordev/arestic-cli
Usage
Usage: npx arestic [options] [command]
Options:
-c, --config-path <value> Config path (default: "arestic.{json,yaml,yml}:$HOME/arestic.{json,yaml,yml}")
-h, --help display help for command
Commands:
parse Parse config
backup [options] Create snapshots
forget [options] Forget snapshots
help [command] display help for command
Config schema
https://github.com/swordev/arestic-cli/blob/main/arestic.schema.json
Config examples
Single repository
repositories:
local:
backend: local
path: /var/data/restic
backups:
user:
password: SECRET
repositories:
- local
paths:
- /home/user
options:
tag:
- data
Multiple repository
repositories:
remote-base:
backend: rest
protocol: http
host: 127.0.0.1
port: 8000
remote:
extends: remote-base
username: username
password: SECRET
path: /username
local:
backend: local
path: /var/data/restic
backups:
user:
passwordPath: /var/secret/password-restic
repositories:
- remote
- local
paths:
- /home/user
options:
tag:
- data
Custom snapshot date
repositories:
local:
backend: local
path: /var/data/restic
backups:
backups:
repositories:
- local
password: SECRET
snapshotByPath: true
pathGlobs:
- patterns: /var/data/backups/*
onlyDirectories: true
pathRegexes:
- backup-(?<date>[\d\-]+)$
regexDateFormat: YYYY-MM-DD-HH-mm-ss