github.com/KyaXTeam/consul@v1.4.5/website/source/docs/commands/snapshot/restore.html.markdown.erb (about)

     1  ---
     2  layout: "docs"
     3  page_title: "Commands: Snapshot Restore"
     4  sidebar_current: "docs-commands-snapshot-restore"
     5  ---
     6  
     7  # Consul Snapshot Restore
     8  
     9  Command: `consul snapshot restore`
    10  
    11  The `snapshot restore` command is used to restore an atomic, point-in-time
    12  snapshot of the state of the Consul servers which includes key/value entries,
    13  service catalog, prepared queries, sessions, and ACLs. The snapshot is read
    14  from the given file.
    15  
    16  Restores involve a potentially dangerous low-level Raft operation that is not
    17  designed to handle server failures during a restore. This command is primarily
    18  intended to be used when recovering from a disaster, restoring into a fresh
    19  cluster of Consul servers.
    20  
    21  If ACLs are enabled, a management token must be supplied in order to perform
    22  a snapshot restore.
    23  
    24  ## Usage
    25  
    26  Usage: `consul snapshot restore [options] FILE`
    27  
    28  #### API Options
    29  
    30  <%= partial "docs/commands/http_api_options_client" %>
    31  <%= partial "docs/commands/http_api_options_server" %>
    32  
    33  ## Examples
    34  
    35  To restore a snapshot from the file "backup.snap":
    36  
    37  ```text
    38  $ consul snapshot restore backup.snap
    39  Restored snapshot
    40  ```
    41  
    42  Please see the [HTTP API](/api/snapshot.html) documentation for
    43  more details about snapshot internals.