Restore a snapshot

Create a new server from the snapshot. The original server stays as it is. The new server gets the original's team, size and attachments. The new server gets new IP addresses unless you send reserved IPs. To restore a snapshot taken in another zone, call this zone and send that zone in from_availability_zone.

POST https://{availability_zone}.betterstackcloud.com/v1/snapshots/{id}/restore
id string required

The ID of the snapshot to restore.

Authorization string required

Bearer $TOKEN

Content-Type string

application/json

name string

The new server's name. Defaults to a name made from the snapshot's name.

from_availability_zone string

The zone the snapshot was taken in, when it isn't this zone. The new server is created in the zone you call.

reserved_ip_ids array of strings

The IDs of reserved IPs to give the new server. Each reserved IP must be unassigned, in the zone you call and in the snapshot's team.

public_ipv4 boolean

Whether the new server gets a public IPv4 address. Leave it out to use the snapshot's setting. When you leave it out and send a reserved IPv4 address in reserved_ip_ids, the new server gets a public IPv4 address.

ddos_protection boolean

Whether the new server has DDoS protection. Leave it out to use the snapshot's setting.

ai_engineer_access boolean

Whether AI Engineer can sign in to the new server over SSH. Leave it out to use the snapshot's setting. A snapshot without a setting allows it.

vulnerability_monitoring boolean

Whether we scan the new server for vulnerabilities every day. Leave it out to use the snapshot's setting.

root_password boolean

Whether to set a new root password and return it once. Send false or leave it out to keep the passwords from the snapshot.

subdomain boolean default: true

Whether the new server gets its own subdomain, made from its name. Defaults to true. The original server keeps its subdomain.

cloudflare_records array of objects

Cloudflare DNS records to point at the new server. Each entry creates an A record and an AAAA record named cloudflare_a_record in the Cloudflare zone cloudflare_domain.

cloudflare_records[].cloudflare_account_id string required

The ID of the Cloudflare account that holds the zone. Connect the account to your team first, under Integrations → Cloudflare in the web app.

cloudflare_records[].cloudflare_domain string required

The Cloudflare zone to add the records to, such as example.com.

cloudflare_records[].cloudflare_a_record string required

The record name, such as www.

cloudflare_records[].cloudflare_proxied boolean default: false

Whether Cloudflare proxies traffic to the server. Defaults to false.

cloudflare_records[].cloudflare_a_record_ttl integer

The records' TTL in seconds, from 60 to 86400, or 1 for automatic. A proxied record must use 1. Defaults to automatic.

202 Accepted
{
  "root_password": "example"
}

Returns the server.

root_password string

The new server's root password. Returned once, when you send root_password set to true, so save it then.