github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/website/content/docs/commands/operator/snapshot-save.mdx (about)

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