mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
When cluster administrators restore from Raft snapshot, they also need to ensure the keyring is in place. For on-prem users doing in-place upgrades this is less of a concern but for typical cloud workflows where the whole host is replaced, it's an important warning (at least until #14852 has been implemented).
53 lines
1.4 KiB
Plaintext
53 lines
1.4 KiB
Plaintext
---
|
|
layout: docs
|
|
page_title: 'Commands: operator snapshot save'
|
|
description: |
|
|
Saves snapshot of Nomad server state
|
|
---
|
|
|
|
# Command: operator snapshot save
|
|
|
|
Retrieves an atomic, point-in-time snapshot of the state of the Nomad servers
|
|
which includes jobs, nodes, allocations, periodic jobs, and ACLs for [outage
|
|
recovery].
|
|
|
|
If ACLs are enabled, a management token must be supplied in order to perform
|
|
snapshot operations.
|
|
|
|
To create a snapshot from the leader server and save it to "backup.snap":
|
|
|
|
```shell-session
|
|
$ nomad operator snapshot save backup.snap
|
|
```
|
|
|
|
To create a potentially stale snapshot from any available server (useful if no
|
|
leader is available):
|
|
|
|
```shell-session
|
|
$ nomad operator snapshot save -stale backup.snap
|
|
```
|
|
|
|
This command only saves a Raft snapshot. If you use this snapshot to recover a
|
|
cluster, you will also need to [restore the keyring][] onto at least one server.
|
|
|
|
|
|
## Usage
|
|
|
|
```plaintext
|
|
nomad operator snapshot save [options] <file>
|
|
```
|
|
|
|
## General Options
|
|
|
|
@include 'general_options_no_namespace.mdx'
|
|
|
|
## Snapshot Save Options
|
|
|
|
- `-stale`: The stale argument defaults to "false" which means the leader
|
|
provides the result. If the cluster is in an outage state without a leader, you
|
|
may need to set `-stale` to "true" to get the configuration from a non-leader
|
|
server.
|
|
|
|
[outage recovery]: /nomad/tutorials/manage-clusters/outage-recovery
|
|
[restore the keyring]: /nomad/docs/operations/key-management#restoring-the-keyring-from-backu
|