Restore a Valkey instance's snapshot
Create a new Valkey instance from an available snapshot, in the same team and zone. The new instance gets the snapshot's data, plan, engine version, eviction policy and persistence setting, with its own ID, hostname and AUTH token. Public access starts off. The new instance is returned as restoring, and its replicas start once the primary is ready.
The ID of the valkey the Valkey snapshot belongs to.
The ID of the Valkey snapshot to restore.
Bearer $TOKEN
application/json
The new instance's name. Defaults to the original instance's name followed by -restored- and four random characters.
The number of replicas of the new instance, from 0 to 2. Defaults to the number the instance had when the snapshot was created.
{
"id": "example",
"name": "Example Valkey instance",
"type": "VK1",
"usable_memory_gb": 1,
"max_connections": 1,
"engine_version": "1.4.2",
"available_engine_versions": [
"1.4.2"
],
"status": "provisioning",
"status_message": "example",
"eviction_policy": "noeviction",
"persistence": "rdb",
"public_access": false,
"replica_count": 50,
"endpoint": {
"hostname": "proxy.example.com",
"public_hostname": "proxy.example.com",
"port": 443,
"tls_port": 443,
"private_ips": [
{
"network_id": "123456789",
"ip_address": "example"
}
],
"public_ips": [
{
"ip": "example",
"type": "example"
}
]
},
"members": [
{
"id": "example",
"role": "primary",
"status": "provisioning",
"replication_lag_bytes": 1,
"private_ips": [
{
"network_id": "123456789",
"ip_address": "example"
}
],
"created_at": "2026-07-01T12:00:00.000Z"
}
],
"network_ids": [
"123456789"
],
"firewall_ids": [
"123456789"
],
"latest_snapshot_at": "2026-07-01T12:00:00.000Z",
"term": "monthly",
"created_at": "2026-07-01T12:00:00.000Z",
"updated_at": "2026-07-01T12:00:00.000Z",
"team_id": "t123",
"metadata": {
"example": "value"
}
}
{
"error": {
"message": "Malformed JSON body.",
"code": "bad_request"
}
}
{
"error": {
"message": "Missing or invalid token.",
"code": "unauthorized"
}
}
{
"error": {
"message": "We require at least one successful credit card transaction before allowing billable actions via the API. This significantly helps us to prevent fraud. Once your first transaction is processed, you will be able to use the API unrestricted. Please add credit to your account at https://betterstack.com/settings/billing/card/new?credits=10&activate_api=true. Need help? We're here for you at hello@betterstack.com.",
"code": "payment_required"
}
}
{
"error": {
"message": "The request could not be completed right now. Please try again in a few moments.",
"code": "internal_error"
}
}
Returns the Valkey instance.
The body isn't valid JSON.
The API token is missing or invalid.
The organization hasn't made its first payment yet, and the request creates a resource we charge for. The code is payment_required. A request that creates a server, load balancer, object cache, database, reserved IP or volume can also return first_purchase. The url in first_purchase opens a page where you make the payment. The resource is created after the payment. The page works until expires_at, 24 hours after the response.
The organization has as many Valkey instances as its quota allows. The error code is quota_exceeded.
The snapshot doesn't exist, or we no longer have the plan it was taken on.
The snapshot isn't available, or it wasn't saved with its instance's settings. The error code is snapshot_not_restorable.
A value for the new instance isn't valid. The error code is validation_failed.
We've locked the resource, with the code locked. Every change to a locked resource is refused, and so is a change that involves one.
Too many requests, with the code rate_limited. We limit requests per client IP and per organization, and some costly endpoints have a stricter limit. Wait as long as the Retry-After header says.
An unexpected, temporary error on our side, with the code internal_error. Try again.
Another instance is being created in the organization at the same time, with the code concurrent_create_limit. Or we couldn't set up the new instance, with the code orchestration_failed.
The instance's ID, a UUID.
The instance's name, up to 255 characters.
The plan, such as VK2.
Memory for your data on each member, in GiB.
The most client connections the plan accepts.
The Valkey version, such as 9.1.
The versions you can upgrade the instance to now.
The instance's state. A new instance is ready once it's running. A running instance can still be adding a replica or opening its public TLS endpoint.
Valid values:provisioning: We're creating the instance.running: The instance is ready.degraded: A member doesn't respond. status_message says which.rescaling: We're changing the plan.upgrading: We're upgrading the Valkey version.restoring: We're restoring a snapshot onto the instance.failed: The instance couldn't be created and stays in this state.destroyed: The instance is deleted.
What needs attention now, such as a member that doesn't respond or a rescale or upgrade that didn't complete. Is null when all is well.
What Valkey does when memory is full, as its maxmemory-policy setting.
Valid values:noeviction: Valkey refuses writes when memory is full.allkeys-lru: Valkey evicts the least recently used keys.allkeys-lfu: Valkey evicts the least frequently used keys.allkeys-random: Valkey evicts random keys.volatile-lru: Valkey evicts the least recently used keys that have an expiry.volatile-lfu: Valkey evicts the least frequently used keys that have an expiry.volatile-random: Valkey evicts random keys that have an expiry.volatile-ttl: Valkey evicts the keys with an expiry that expire soonest.
Whether Valkey keeps the data across restarts. Snapshots work either way.
Valid values:rdb: Valkey keeps the data across restarts.none: Valkey keeps the data in memory only, as a pure cache.
Whether the primary accepts connections with TLS on a public IP, on port 6380.
How many replicas the instance has besides the primary, from 0 to 2.
Where to connect to the current primary.
The hostname to connect to from your private networks. Always points at the current primary's addresses in those networks.
The hostname to connect to from the internet, on the public TLS endpoint, or null when public_access is off. Always points at the current primary's public IP addresses.
The port without TLS on private networks, 6379.
The public TLS port, 6380, or null when public_access is off.
The primary's addresses in the attached private networks.
The ID of the private network.
The primary's IP address in that network.
The primary's public IP addresses, empty when public_access is off.
The public IP address.
The address type, ipv4 or ipv6.
The instance's primary and replicas, with their addresses in your private networks.
The member's ID.
The member's role.
Valid values:primary: The member accepts writes.replica: The member copies the primary and serves reads.
The member's state. Send traffic to a member only while it's running.
Valid values:provisioning: We're creating the member.syncing: The replica is copying the primary's data.running: The member serves traffic.down: The member doesn't respond.
How far the replica is behind the primary, in bytes, or null for the primary.
The member's addresses in the attached private networks.
The ID of the private network.
The member's IP address in that network.
When the member was created. In ISO 8601 format, such as 2026-07-01T12:00:00Z.
The IDs of the private networks attached to the instance. Order doesn't matter.
The IDs of the firewalls attached to the instance. An instance can have one firewall. Order doesn't matter.
When the newest available snapshot was created. In ISO 8601 format, such as 2026-07-01T12:00:00Z.
The billing term. Defaults to monthly.
Valid values:monthly: The instance is billed every month.annual: The instance is paid for a year.
When the instance was created. In ISO 8601 format, such as 2026-07-01T12:00:00Z.
When the instance was last changed. In ISO 8601 format, such as 2026-07-01T12:00:00Z.
The ID of the team that owns the instance.
Your own tags as string pairs, at most 10.