mirror of https://github.com/hashicorp/consul
44 lines
1.2 KiB
Plaintext
44 lines
1.2 KiB
Plaintext
---
|
|
layout: "docs"
|
|
page_title: "Commands: Snapshot Restore"
|
|
sidebar_current: "docs-commands-snapshot-restore"
|
|
---
|
|
|
|
# Consul Snapshot Restore
|
|
|
|
Command: `consul snapshot restore`
|
|
|
|
The `snapshot restore` command is used to restore an atomic, point-in-time
|
|
snapshot of the state of the Consul servers which includes key/value entries,
|
|
service catalog, prepared queries, sessions, and ACLs. The snapshot is read
|
|
from the given file.
|
|
|
|
Restores involve a potentially dangerous low-level Raft operation that is not
|
|
designed to handle server failures during a restore. This command is primarily
|
|
intended to be used when recovering from a disaster, restoring into a fresh
|
|
cluster of Consul servers.
|
|
|
|
If ACLs are enabled, a management token must be supplied in order to perform
|
|
snapshot a snapshot save.
|
|
|
|
## Usage
|
|
|
|
Usage: `consul snapshot restore [options] FILE`
|
|
|
|
#### API Options
|
|
|
|
<%= partial "docs/commands/http_api_options_client" %>
|
|
<%= partial "docs/commands/http_api_options_server" %>
|
|
|
|
## Examples
|
|
|
|
To restore a snapshot from the file "backup.snap":
|
|
|
|
```text
|
|
$ consul snapshot restore backup.snap
|
|
Restored snapshot
|
|
```
|
|
|
|
Please see the [HTTP API](/api/snapshot.html) documentation for
|
|
more details about snapshot internals.
|