Vault
/sys/storage/raft/snapshot-load
Enterprise
Appropriate Vault Enterprise license required
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.
Restrictions for loading snapshots
- The snapshot must be from the same cluster and have the same unseal keys as the current cluster.
- You can only load one snapshot into a cluster at a time.
- Vault automatically unloads snapshots 72 hours after they are loaded.
- If your cluster's active node changes, the loaded snapshot's status updates
to
error
and it cannot be used for any recover operations. You must unload and reload the snapshot to use it again. - You cannot load a snapshot if your cluster has mlock enabled in its Vault configuration.
Sample request
$ 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
{
"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
$ curl \
--header "X-Vault-Token: ..." \
--request LIST \
http://127.0.0.1:8200/v1/sys/storage/raft/snapshot-load
Sample response
{
"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
$ 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:
{
"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:
{
"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
$ curl \
--header "X-Vault-Token: ..." \
--request DELETE \
http://127.0.0.1:8200/v1/sys/storage/raft/snapshot-load/2403d301-94f2-46a1-a39d-02be83e2831a