mirror of
https://github.com/cupcakearmy/autorestic.git
synced 2025-09-06 02:20:39 +00:00
3
docs/pages/cli/_meta.json
Normal file
3
docs/pages/cli/_meta.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"general": "General"
|
||||
}
|
23
docs/pages/cli/backup.md
Normal file
23
docs/pages/cli/backup.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# Backup
|
||||
|
||||
```bash
|
||||
autorestic backup [-l, --location] [-a, --all]
|
||||
```
|
||||
|
||||
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
|
||||
# All
|
||||
autorestic backup -a
|
||||
|
||||
# Some
|
||||
autorestic backup -l foo -l bar
|
||||
```
|
||||
|
||||
## Specific location
|
||||
|
||||
`autorestic` also allows selecting specific backends for a location with the `location@backend` syntax.
|
||||
|
||||
```bash
|
||||
autorestic backup -l location@backend
|
||||
```
|
9
docs/pages/cli/check.md
Normal file
9
docs/pages/cli/check.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Check
|
||||
|
||||
```bash
|
||||
autorestic check
|
||||
```
|
||||
|
||||
Checks locations and backends are configured properly and initializes them if they are not already.
|
||||
|
||||
This is mostly an internal command, but useful to verify if a backend is configured correctly.
|
15
docs/pages/cli/completion.md
Normal file
15
docs/pages/cli/completion.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# Completion
|
||||
|
||||
```bash
|
||||
autorestic completion [bash|zsh|fish|powershell]
|
||||
```
|
||||
|
||||
Autorestic can generate shell completions automatically to make the experience even easier.
|
||||
Supported shells are
|
||||
|
||||
- bash
|
||||
- zsh
|
||||
- fish
|
||||
- powershell
|
||||
|
||||
To see how to install run `autorestic help completion` and follow the instructions for your specific shell
|
11
docs/pages/cli/cron.md
Normal file
11
docs/pages/cli/cron.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Cron
|
||||
|
||||
```bash
|
||||
autorestic cron [--lean]
|
||||
```
|
||||
|
||||
This command is mostly intended to be triggered by an automated system like systemd or crontab.
|
||||
|
||||
It will run cron jobs as [specified in the cron section](/location/cron) of a specific location.
|
||||
|
||||
The `--lean` flag will omit output like _skipping location x: not due yet_. This can be useful if you are dumping the output of the cron job to a log file and don't want to be overwhelmed by the output log.
|
13
docs/pages/cli/exec.md
Normal file
13
docs/pages/cli/exec.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Exec
|
||||
|
||||
```bash
|
||||
autorestic exec [-b, --backend] [-a, --all] <command> -- [native options]
|
||||
```
|
||||
|
||||
This is a very handy command which enables you to run any native restic command on desired backends. Generally you will want to include the verbose flag `-v, --verbose` to see the output. An example would be listing all the snapshots of all your backends:
|
||||
|
||||
```bash
|
||||
autorestic exec -av -- snapshots
|
||||
```
|
||||
|
||||
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.
|
11
docs/pages/cli/forget.md
Normal file
11
docs/pages/cli/forget.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Forget
|
||||
|
||||
```bash
|
||||
autorestic forget [-l, --location] [-a, --all] [--dry-run] [--prune]
|
||||
```
|
||||
|
||||
This will prune and remove old data form the backends according to the [keep policy you have specified for the location](/location/forget).
|
||||
|
||||
The `--dry-run` flag will do a dry run showing what would have been deleted, but won't touch the actual data.
|
||||
|
||||
The `--prune` flag will also [prune the data](https://restic.readthedocs.io/en/latest/060_forget.html#removing-backup-snapshots). This is a costly operation that can take longer, however it will free up the actual space.
|
36
docs/pages/cli/general.md
Normal file
36
docs/pages/cli/general.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# General
|
||||
|
||||
## `-c, --config`
|
||||
|
||||
Specify the config file to be used (must use .yml as an extension).
|
||||
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`
|
||||
|
||||
Run the CLI in CI Mode, which means there will be no interactivity, no colors and automatically sets the `--verbose` flag.
|
||||
|
||||
This can be useful when you want to run cron e.g. as all the output will be saved.
|
||||
|
||||
```bash
|
||||
autorestic --ci backup -a
|
||||
```
|
||||
|
||||
## `-v, --verbose`
|
||||
|
||||
Verbose mode will show the output of the native restic commands that are otherwise not printed out. Useful for debugging or logging in automated tasks.
|
||||
|
||||
```bash
|
||||
autorestic --verbose backup -a
|
||||
```
|
||||
|
||||
## `--restic-bin`
|
||||
|
||||
With `--restic-bin` you can specify to run a specific restic binary. This can be useful if you want to [create a custom binary with root access that can be executed by any user](https://restic.readthedocs.io/en/stable/080_examples.html#full-backup-without-root).
|
||||
|
||||
```bash
|
||||
autorestic --restic-bin /some/path/to/my/custom/restic/binary
|
||||
```
|
16
docs/pages/cli/info.md
Normal file
16
docs/pages/cli/info.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# Info
|
||||
|
||||
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` 😉
|
||||
|
||||
```bash
|
||||
autorestic info
|
||||
```
|
||||
|
||||
## With a custom file
|
||||
|
||||
```bash
|
||||
autorestic -c path/to/some/config.yml info
|
||||
```
|
7
docs/pages/cli/install.md
Normal file
7
docs/pages/cli/install.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Install
|
||||
|
||||
Installs both restic and autorestic to `/usr/local/bin`.
|
||||
|
||||
```bash
|
||||
autorestic install
|
||||
```
|
17
docs/pages/cli/restore.md
Normal file
17
docs/pages/cli/restore.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Restore
|
||||
|
||||
```bash
|
||||
autorestic restore [-l, --location] [--from backend] [--to <out dir>] [-f, --force] [snapshot]
|
||||
```
|
||||
|
||||
This will restore the location to the selected target. If for one location there are more than one backends specified autorestic will take the first one. If no specific snapshot is specified `autorestic` will use `latest`.
|
||||
|
||||
If you are sure you can pass the `-f, --force` flag and the data will be overwritten in the destination. However note that this will overwrite all the data existent in the backup, not only the 1 file that is missing e.g.
|
||||
|
||||
## Example
|
||||
|
||||
```bash
|
||||
autorestic restore -l home --from hdd --to /path/where/to/restore
|
||||
```
|
||||
|
||||
This will restore the location `home` to the `/path/where/to/restore` folder and taking the data from the backend `hdd`
|
7
docs/pages/cli/uninstall.md
Normal file
7
docs/pages/cli/uninstall.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Uninstall
|
||||
|
||||
Uninstalls both restic and autorestic from `/usr/local/bin`.
|
||||
|
||||
```bash
|
||||
autorestic uninstall
|
||||
```
|
9
docs/pages/cli/upgrade.md
Normal file
9
docs/pages/cli/upgrade.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# Upgrade
|
||||
|
||||
Autorestic can upgrade itself! Super handy right? Simply run autorestic upgrade and we will check for you if there are updates for restic and autorestic and install them if necessary.
|
||||
|
||||
```bash
|
||||
autorestic upgrade
|
||||
```
|
||||
|
||||
Updates both restic and autorestic automagically.
|
Reference in New Issue
Block a user