An open API service indexing awesome lists of open source software.

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.

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
```