diff --git a/docs/_toc.md b/docs/_toc.md index dd7912f..39a5f80 100644 --- a/docs/_toc.md +++ b/docs/_toc.md @@ -19,6 +19,7 @@ > :Collapse label=CLI > +> [General](/cli/general) > [Info](/cli/info) > [Check](/cli/check) > [Backup](/cli/backup) diff --git a/docs/cli/backup.md b/docs/cli/backup.md index fce14b1..7820786 100644 --- a/docs/cli/backup.md +++ b/docs/cli/backup.md @@ -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 diff --git a/docs/cli/check.md b/docs/cli/check.md index 9fdd5d5..4ae41e0 100644 --- a/docs/cli/check.md +++ b/docs/cli/check.md @@ -1,4 +1,4 @@ -# check +# Check ```bash autorestic check [-b, --backend] [-a, --all] diff --git a/docs/cli/cron.md b/docs/cli/cron.md index d96c758..d9e1de3 100644 --- a/docs/cli/cron.md +++ b/docs/cli/cron.md @@ -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. diff --git a/docs/cli/exec.md b/docs/cli/exec.md index 7142e53..c2f0788 100644 --- a/docs/cli/exec.md +++ b/docs/cli/exec.md @@ -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 diff --git a/docs/cli/general.md b/docs/cli/general.md new file mode 100644 index 0000000..842d19c --- /dev/null +++ b/docs/cli/general.md @@ -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 +``` diff --git a/docs/cli/info.md b/docs/cli/info.md index e1c00aa..0133ce7 100644 --- a/docs/cli/info.md +++ b/docs/cli/info.md @@ -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` 😉 diff --git a/docs/examples.md b/docs/examples.md index 26a14a4..ca80aa0 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -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 diff --git a/docs/location/cron.md b/docs/location/cron.md index 2c37c7c..6b9badf 100644 --- a/docs/location/cron.md +++ b/docs/location/cron.md @@ -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