Prerequisites
- Vault OSS or Enterprise (v1.10.2+ for scheduled snapshots)
- Vault Enterprise license
- CLI access to your Vault server
Manually Taking a Raft Snapshot
Use thevault operator raft snapshot save command to export the entire Vault state into a single file:
Each Raft snapshot includes Vault’s complete configuration, metadata, and KV data. Store snapshots in a secure, redundant location.
Restoring from a Snapshot
To restore a Vault node from an existing snapshot, run:temp.snap.
Restoring from a snapshot overwrites your existing Vault data. Confirm you have a valid backup before proceeding.
Configuring Automated Snapshots (Enterprise Only)
Vault Enterprise supports scheduled Raft snapshots via thesys/storage/raft/snapshot-auto/config endpoint. First, confirm you’re running Enterprise:
Configuration Fields
| Parameter | Description | Example |
|---|---|---|
interval | How often to take snapshots (1h, 24h, etc.) | 1h |
retain | Number of snapshots to keep | 24 |
storage_type | Storage backend (local, aws-s3, etc.) | local |
path_prefix | Directory path for local snapshot files | /opt/vault |
local_max_space | Maximum disk space (MB) allocated for local snapshots | 100 |
Using Cloud Storage for Automated Snapshots
To store snapshots in AWS S3, setstorage_type=aws-s3 and specify your bucket:
aws_s3_endpoint: Custom S3 endpoint (e.g., VPC endpoint)aws_access_key_id/aws_secret_access_key: IAM credentials (if not using roles)kms_key_id: KMS key for server-side encryption
Summary
You’ve learned how to:- Create and restore one-off Raft snapshots with
vault operator raft snapshot. - Configure automated snapshot jobs in Vault Enterprise for both local storage and AWS S3.