Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
juanrgm committed Dec 11, 2020
1 parent 7df14ee commit 629d4ad
Show file tree
Hide file tree
Showing 25 changed files with 7,150 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .editorconfig
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
6 changes: 6 additions & 0 deletions .eslintignore
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
17 changes: 17 additions & 0 deletions .eslintrc.json
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"
]
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
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
20 changes: 20 additions & 0 deletions .github/workflows/publish.yml
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}}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.history
lib
node_modules
1 change: 1 addition & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
semi: false
86 changes: 85 additions & 1 deletion README.md
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
```
Loading

0 comments on commit 629d4ad

Please sign in to comment.