github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/docs/commands/operator/snapshot/save.mdx (about)

     1  ---
     2  layout: docs
     3  page_title: 'Commands: operator snapshot save'
     4  description: |
     5    Saves snapshot of Nomad server state
     6  ---
     7  
     8  # Command: operator snapshot save
     9  
    10  Retrieves an atomic, point-in-time snapshot of the state of the Nomad servers
    11  which includes jobs, nodes, allocations, periodic jobs, and ACLs for [outage
    12  recovery].
    13  
    14  If ACLs are enabled, a management token must be supplied in order to perform
    15  snapshot operations.
    16  
    17  To create a snapshot from the leader server and save it to "backup.snap":
    18  
    19  ```shell-session
    20  $ nomad operator snapshot save backup.snap
    21  ```
    22  
    23  To create a potentially stale snapshot from any available server (useful if no
    24  leader is available):
    25  
    26  ```shell-session
    27  $ nomad operator snapshot save -stale backup.snap
    28  ```
    29  
    30  ## Usage
    31  
    32  ```plaintext
    33  nomad operator snapshot save [options] <file>
    34  ```
    35  
    36  ## General Options
    37  
    38  @include 'general_options_no_namespace.mdx'
    39  
    40  ## Snapshot Save Options
    41  
    42  - `-stale`: The stale argument defaults to "false" which means the leader
    43    provides the result. If the cluster is in an outage state without a leader, you
    44    may need to set `-stale` to "true" to get the configuration from a non-leader
    45    server.
    46  
    47  [outage recovery]: https://learn.hashicorp.com/tutorials/nomad/outage-recovery