How to Manage Snapshots for Vultr Instances
-
by Blog Admin
- 9
How to Manage Snapshots for Vultr Instances
A process that prepares and configures a new server or service to make it ready for use.
Snapshots for Vultr instances are point-in-time images of your entire Cloud Compute instances hard drives. You can use snapshots to create backups or to replicate Cloud Compute instances. Unlike Automatic Backups for Vultr instances, you must take snapshots manually.
Follow this guide to manage Snapshots for Vultr instances using the Vultr Customer Portal, API, CLI, or Terraform.
Vultr Customer Portal
- Navigate to Products and select Compute.
- Select your target Cloud Compute instance from the list.
- Navigate to Snapshots, enter a label and click Take Snapshot.
Vultr API
- Send a
GET
request to the List Instances endpoint to get the Cloud Compute instance ID.console$ curl "https://api.vultr.com/v2/instances" \ -X GET \ -H "Authorization: Bearer ${VULTR_API_KEY}"
- Send a
POST
request to the Create Snapshot endpoint specifying a cloud compute instance ID to create a snapshot.console$ curl "https://api.vultr.com/v2/snapshots" \ -X POST \ -H "Authorization: Bearer ${VULTR_API_KEY}" \ -H "Content-Type: application/json" \ --data '{ "instance_id" : "instance_id", "description" : "Weekly-Snapshot-14-08-2024" }'
Visit the Create Snapshot endpoint to view additional attributes to add to your request.
- Send a
GET
request to the List Snapshots endpoint to view all snapshots.console$ curl "https://api.vultr.com/v2/snapshots" \ -X GET \ -H "Authorization: Bearer ${VULTR_API_KEY}"
Vultr CLI
- List all cloud compute instances and note the instance ID.
console
$ vultr-cli instance list
- Create a snapshot by specifying the Cloud Compute instance ID and the snapshot description.
console
$ vultr-cli snapshot create --id instance_id --description "Weekly Snapshot 14-08-2024"
- List all snapshots.
console
$ vultr-cli snapshot list
Run
vultr-cli snapshot create --help
to view all options.
Terraform
- Create a snapshot from an existing instance.
terraform
resource "vultr_snapshot" "weekly" { instance_id = var.instance_id description = "Weekly-Snapshot-14-08-2024" }
- Optionally, boot a new instance from a snapshot by setting
snapshot_id
.terraformresource "vultr_instance" "from_snapshot" { region = "ewr" plan = "vc2-2c-4gb" label = "restored" snapshot_id = vultr_snapshot.weekly.id }
- Apply the configuration and observe the following output:
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
How to Manage Snapshots for Vultr Instances A process that prepares and configures a new server or service to make it ready for use. Snapshots for Vultr instances are point-in-time images of your entire Cloud Compute instances hard drives. You can use snapshots to create backups or to replicate Cloud…
How to Manage Snapshots for Vultr Instances A process that prepares and configures a new server or service to make it ready for use. Snapshots for Vultr instances are point-in-time images of your entire Cloud Compute instances hard drives. You can use snapshots to create backups or to replicate Cloud…