-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
7,150 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
|
||
[*.{ts,js}] | ||
indent_style = tab | ||
indent_size = 4 | ||
|
||
[*.json] | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.history | ||
lib | ||
node_modules | ||
src/AResticSchema.d.ts | ||
package-lock.json | ||
bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": ["prettier"], | ||
"env": { | ||
"node": true | ||
}, | ||
"rules": { | ||
"@typescript-eslint/explicit-module-boundary-types": "off" | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:prettier/recommended" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: CI | ||
|
||
on: [push] | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
- run: npm ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Publish | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
registry-url: https://registry.npmjs.org | ||
scope: "@swordev" | ||
- run: npm install | ||
- run: npm publish --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.history | ||
lib | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
semi: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,85 @@ | ||
# arestic-cli | ||
# arestic-cli | ||
> CLI tool for automatic restic backups. | ||
# Features | ||
- Backup config profiles | ||
- File config JSON/YAML format | ||
- Auto init repositories | ||
- Logging file | ||
- Cross-platform | ||
|
||
## Install | ||
|
||
```sh | ||
npm install -g @swordev/arestic | ||
``` | ||
|
||
## Usage | ||
|
||
``` | ||
Usage: npx arestic [options] [command] | ||
Options: | ||
-c, --config-path <value> Config path (default: "arestic.{json,yaml,yml}") | ||
-h, --help display help for command | ||
Commands: | ||
parse Parse config | ||
backup [options] Create backups | ||
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 | ||
``` |
Oops, something went wrong.