https://github.com/swordev/arestic-cli
CLI tool for automatic restic backups.
https://github.com/swordev/arestic-cli
auto-restic backup cli config profile restic
Last synced: 7 months ago
JSON representation
CLI tool for automatic restic backups.
- Host: GitHub
- URL: https://github.com/swordev/arestic-cli
- Owner: swordev
- License: mit
- Created: 2020-12-11T11:03:40.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-01-07T11:07:48.000Z (over 5 years ago)
- Last Synced: 2024-04-27T03:02:12.965Z (about 2 years ago)
- Topics: auto-restic, backup, cli, config, profile, restic
- Language: TypeScript
- Homepage:
- Size: 366 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
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
```sh
npm install -g @swordev/arestic-cli
```
## Usage
```
Usage: npx arestic [options] [command]
Options:
-c, --config-path 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
```yaml
repositories:
local:
backend: local
path: /var/data/restic
backups:
user:
password: SECRET
repositories:
- local
paths:
- /home/user
options:
tag:
- data
```
### Multiple repository
```yaml
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
```yaml
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-(?[\d\-]+)$
regexDateFormat: YYYY-MM-DD-HH-mm-ss
```