docs: add note about TMPDIR for snapshots

This commit is contained in:
Joel Watson 2021-01-06 12:56:40 -06:00
parent db62541676
commit f68bf30c06
1 changed files with 10 additions and 0 deletions

View File

@ -16,6 +16,16 @@ the given file.
If ACLs are enabled, a management token must be supplied in order to perform
a snapshot save.
-> Note that saving a snapshot involves the server process writing the snapshot to a
temporary file on-disk before sending that file to the CLI client. The default location
can vary depending on operating system, but typically is `/tmp`. You can get more detailed
information on default locations in the Go documentation for [os.TempDir](https://golang.org/pkg/os/#TempDir).
If you need to change this location, you can do so by setting the `TMPDIR` environment
variable for the Consul server processes. Keep in mind that setting the environment variable for
the CLI client attempting to perform a snapshot save will have no effect. It _must_ be set in
the context of the server process. If you're using Systemd to manage your Consul server
processes, then adding `Environment=TMPDIR=/path/to/dir` to your Consul unit file will work.
## Usage
Usage: `consul snapshot save [options] FILE`