Skip to content

Commit fa27d04

Browse files
committed
doc(lock): add lockfile doc with customization explanation
1 parent c9a1474 commit fa27d04

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

docs/pages/cli/general.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ autorestic --restic-bin /some/path/to/my/custom/restic/binary
3737

3838
## `--lockfile-path`
3939

40-
Specify the path for the lockfile used by `autorestic`. If omitted, this will default to `.autorestic.lock.yml` next to the loaded config file.
40+
Specify the path for the [lockfile](../lockfile.md) used by `autorestic`. If omitted, this will default to `.autorestic.lock.yml` next to the loaded config file.
4141

4242
```bash
4343
autorestic --lockfile-path /path/to/my/.autorestic.lock.yml

docs/pages/lockfile.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Lockfile
2+
3+
Under the hood, `autorestic` uses a lockfile to ensure that only one instance is running and to keep track of when [cronjobs](./location/cron.md) were last run.
4+
5+
By default, the lockfile is stored next to your [configuration file](./config.md) as `.autorestic.lock.yml`. In other words, if your config file is located at `/some/path/.autorestic.yml`, then the lockfile will be located at `/some/path/.autorestic.lock.yml`.
6+
7+
## Customization
8+
9+
The path to the lockfile can be customized if need be. This can be done is a few ways:
10+
11+
1. Using the `--lockfile-path ...` command line flag
12+
1. Setting `lockfile: ...` in the configuration file
13+
14+
Note that `autorestic` will check for a customized lockfile path in the order listed above. This means that if you specify a lockfile path in multiple places, the method that's higher in the list will win.

0 commit comments

Comments
 (0)