vault/website/content/api-docs/system/storage/raftsnapshotload.mdx
Erica Thompson 0660ea6fac
Update README (#31244)
* Update README

Let contributors know that docs will now be located in UDR

* Add comments to each mdx doc

Comment has been added to all mdx docs that are not partials

* chore: added changelog

changelog check failure

* wip: removed changelog

* Fix content errors

* Doc spacing

* Update website/content/docs/deploy/kubernetes/vso/helm.mdx

Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>

---------

Co-authored-by: jonathanfrappier <92055993+jonathanfrappier@users.noreply.github.com>
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
2025-07-22 08:12:22 -07:00

145 lines
3.8 KiB
Plaintext

---
layout: api
page_title: /sys/storage/raft/snapshot-load - HTTP API
description: |-
Use the snapshot-load endpoints to load a snapshot into your Vault cluster
to recover individual pieces of data from the snapshot.
---
> [!IMPORTANT]
> **Documentation Update:** Product documentation, which were located in this repository under `/website`, are now located in [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs), colocated with all other product documentation. Contributions to this content should be done in the `web-unified-docs` repo, and not this one. Changes made to `/website` content in this repo will not be reflected on the developer.hashicorp.com website.
# `/sys/storage/raft/snapshot-load`
@include 'alerts/enterprise-only.mdx'
Manage the state of loaded snapshots within the Vault cluster.
## Load a snapshot into Vault
| Method | Path |
| :----- | :--------------------------------------------- |
| `POST` | `/sys/storage/raft/snapshot-load` |
Load a new snapshot into the Vault cluster without overwriting the cluster with
the snapshot's data. After loading a snapshot, you can recover, read, and list
individual pieces of data from the loaded snapshot.
@include 'recover/loadedsnapshots.mdx'
### Sample request
```shell-session
$ curl \
--header "X-Vault-Token: ..." \
--request POST \
--data-binary @raft.snap \
http://127.0.0.1:8200/v1/sys/storage/raft/snapshot-load
```
### Sample response
```json
{
"data": {
"cluster_id": "2ec84695-cfe5-44f3-b351-3f08a9ccc0c8",
"expires_at": "2025-05-25T15:07:58.187769+01:00",
"snapshot_id": "2403d301-94f2-46a1-a39d-02be83e2831a",
"status": "loading"
}
}
```
## List loaded snapshots
List all snapshots currently loaded in the cluster.
| Method | Path |
| :----- | :--------------------------------------- |
| `LIST` | `/sys/storage/raft/snapshot-load` |
### Sample request
```shell-session
$ curl \
--header "X-Vault-Token: ..." \
--request LIST \
http://127.0.0.1:8200/v1/sys/storage/raft/snapshot-load
```
### Sample response
```json
{
"data": {
"keys": ["2403d301-94f2-46a1-a39d-02be83e2831a"]
}
}
```
## Read loaded snapshot
Read the status details of a given snapshot loaded in the cluster.
| Method | Path |
| :----- | :--------------------------------------------- |
| `GET` | `/sys/storage/raft/snapshot-load/:snapshot_id` |
### Sample request
```shell-session
$ curl \
--header "X-Vault-Token: ..." \
http://127.0.0.1:8200/v1/sys/storage/raft/snapshot-load/2403d301-94f2-46a1-a39d-02be83e2831a
```
### Sample responses
For a snapshot loaded as a binary file:
```json
{
"data": {
"cluster_id": "2ec84695-cfe5-44f3-b351-3f08a9ccc0c8",
"expires_at": "2025-05-25T15:07:58.187769+01:00",
"snapshot_id": "2403d301-94f2-46a1-a39d-02be83e2831a",
"status": "ready"
}
}
```
For a snapshot loaded from a an Automated Snapshot configuration:
```json
{
"data": {
"auto_config_name": "config1",
"cluster_id": "2ec84695-cfe5-44f3-b351-3f08a9ccc0c8",
"expires_at": "2025-05-25T15:07:58.187769+01:00",
"snapshot_id": "2403d301-94f2-46a1-a39d-02be83e2831a",
"url": "https://example.com/raft.snap",
"status": "ready"
}
}
```
## Unload loaded snapshot
Unloads a currently loaded snapshot from the cluster.
| Method | Path |
| :------- | :--------------------------------------------- |
| `DELETE` | `/sys/storage/raft/snapshot-load/:snapshot_id` |
### Sample request
```shell-session
$ curl \
--header "X-Vault-Token: ..." \
--request DELETE \
http://127.0.0.1:8200/v1/sys/storage/raft/snapshot-load/2403d301-94f2-46a1-a39d-02be83e2831a
```