Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
cupcakearmy committed Nov 13, 2020
1 parent b690c1c commit 91e902d
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 13 deletions.
1 change: 1 addition & 0 deletions docs/_toc.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
> :Collapse label=CLI
>
> [General](/cli/general)
> [Info](/cli/info)
> [Check](/cli/check)
> [Backup](/cli/backup)
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/backup.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
autorestic backup [-l, --location] [-a, --all]
```

Performes a backup of all locations if the `-a` flag is passed. To only backup some locations pass one or more `-l` or `--location` flags.
Performs a backup of all locations if the `-a` flag is passed. To only backup some locations pass one or more `-l` or `--location` flags.

```bash
autorestic backup -l my-location
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/check.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# check
# Check

```bash
autorestic check [-b, --backend] [-a, --all]
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/cron.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
autorestic cron
```

This command is modtly intended to be triggered by an automated system like systemd or crontab.
This command is mostly intended to be triggered by an automated system like systemd or crontab.

It will run cron jobs es [specified in the cron section](/locations/cron) of a specific location.

Expand Down
2 changes: 1 addition & 1 deletion docs/cli/exec.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ This is avery handy command which enables you to run any native restic command o
autorestic exec -a -- snapshots
```

With `exec` you can basically run every cli command that you would be able to run with the restic cli. It only prefillst path, key, etc.
With `exec` you can basically run every cli command that you would be able to run with the restic cli. It only pre-fills path, key, etc.

> :ToCPrevNext
29 changes: 29 additions & 0 deletions docs/cli/general.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# General

## `--version`

Prints the current version

```bash
autorestic --version
```

## `--c, --config`

Specify the config file to be used.
If omitted `autorestic` will search for for a `.autorestic.yml` in the current directory and your home directory.

```bash
autorestic -c /path/to/my/config.yml
```

## `--ci`

> Available since version 0.22
Run the CLI in CI Mode, which means there will be no interactivity.
This can be useful when you want to run cron e.g. as all the output will be saved.

```bash
autorestic --ci
```
6 changes: 3 additions & 3 deletions docs/cli/info.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# info
# Info

Displays the config file that autorestic is refering to.
Usefull when you want to quickly see what locations are being backuped where.
Displays the config file that autorestic is referring to.
Useful when you want to quickly see what locations are being backed-up where.

**Pro tip:** if it gets a bit long you can read it more easily with `autorestic info | less` 😉

Expand Down
10 changes: 6 additions & 4 deletions docs/examples.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
# 🐣 Examples

## List all the snapshots for all the backends
## Exec

### List all the snapshots for all the backends

```bash
autorestic -a exec snapshots
autorestic exec -a -- snapshots
```

## Unlock a locked repository
### Unlock a locked repository

If you accidentally cancelled a running operation this could be useful.

Only do this if you know what you are doing.

```bash
autorestic -b my-backend exec unlock
autorestic exec -b my-backend -- unlock
```

> :ToCPrevNext
6 changes: 4 additions & 2 deletions docs/location/cron.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ Then paste this at the bottom of the file and save it. Note that in this specifi
PATH="/usr/local/bin:/usr/bin:/bin"
# Example running every 5 minutes
*/5 * * * * autorestic -c /srv/.autorestic.yml cron
*/5 * * * * autorestic -c /srv/.autorestic.yml --ci cron
```

Now you can add as many `cron` attributes as you wish ⏱
> The `--ci` option is not required, but recommended

Now you can add as many `cron` attributes as you wish in the config file ⏱

> :ToCPrevNext

0 comments on commit 91e902d

Please sign in to comment.