From ca265e18901dbe50109ec6f4e93ebb7b39f1a971 Mon Sep 17 00:00:00 2001 From: Joel Watson Date: Wed, 6 Jan 2021 12:56:40 -0600 Subject: [PATCH] docs: add note about TMPDIR for snapshots --- website/content/commands/snapshot/save.mdx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/website/content/commands/snapshot/save.mdx b/website/content/commands/snapshot/save.mdx index 5c3e24daa5..8ea8e90066 100644 --- a/website/content/commands/snapshot/save.mdx +++ b/website/content/commands/snapshot/save.mdx @@ -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`