How to Manage Automatic Backups for Vultr Cloud Compute

How to Manage Automatic Backups for Vultr Cloud Compute

The process of setting up and configuring a new server or service to make it ready for use.


Automatic Backups for Vultr instances are scheduled point-in-time data recovery solutions that allow you to backup your Cloud Compute instances’ data with minimal intervention. These backups are suitable for mission-critical applications because they aid in data protection, disaster recovery, compliance, and auditing. Vultr supports daily, every other day, weekly, and monthly backup schedules.

Follow this guide to manage Automatic Backups for Vultr instances using the Vultr Customer Portal, API, CLI, or Terraform.

Vultr Customer Portal

  1. Navigate to Products and select Compute.
  2. Select your target Cloud Compute instance from the list.
  3. Navigate to Backups and click Enable Backups.
  4. Click Enable Backups to confirm.
  5. Navigate to Backup Schedule. Then, select daily, weekly, or every other day backup schedule. Set the day of the week and time and click Update.
  6. From this point forward, any new backup appears under the backup history. Click Convert to convert the backup to a manual snapshot or Restore to restore the backup to the cloud compute instance.
  7. Navigate to Products, select Orchestration, then click Backups. Click the camera icon to convert the backup to a snapshot.

Vultr API

  1. 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}"
    
  2. Send a PATCH request to the Update Instance endpoint to turn on automatic backups.
    console
    $ curl "https://api.vultr.com/v2/instances/instance_id" \
        -X PATCH \
        -H "Authorization: Bearer ${VULTR_API_KEY}" \
        -H "Content-Type: application/json" \
        --data '{
            "backups" : "enabled",
            "backups_schedule" : {
                "type" : "daily",
                "hour" : "0"
            }  
        }'
    
  3. Send a PATCH request to the Update Instance endpoint to turn off automatic backups.
    console
    $ curl "https://api.vultr.com/v2/instances/instance_id" \
        -X PATCH \
        -H "Authorization: Bearer ${VULTR_API_KEY}" \
        -H "Content-Type: application/json" \
        --data '{
            "backups" : "disabled"    
        }'
    

    Visit the Update Instance endpoint to view additional attributes to add to your request.

  4. Send a GET request to the List Backups endpoint and note the backup ID.
    console
    $ curl "https://api.vultr.com/v2/backups" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    
  5. Send a GET request to the Get Backup endpoint and specify the backup ID to view the backup details.
    console
    $ curl "https://api.vultr.com/v2/backups/backup_id" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"

Vultr CLI

  1. List all cloud compute instances and note the instance ID.
    console
    $ vultr-cli instance list
    
  2. Update the backup schedule by specifying the instance_id.
    console
    $ vultr-cli instance backup create instance_id --type weekly --dow 0 --hour 0
    
  3. List all backups by specifying a cloud compute instance ID.
    console
    $ vultr-cli instance backup get instace_id
    
  4. List all Cloud Compute instance backups.
    console
    $ vultr-cli backups list
    
  5. Get details of a specific backup by specifying the backup ID.
    console
    $ vultr-cli backups get backup_id
    

    Run vultr-cli instance backup create --help to view all options.

Terraform

  1. Open your Terraform configuration for the existing instance.
  2. Enable automatic backups and optionally set a backup schedule.
    terraform
    resource "vultr_instance" "server" {
        # ...existing fields (region, plan, os_id or snapshot_id, label)
    
        backups = true
    
        # Optional: schedule (availability depends on plan)
        backups_schedule {
            type = "daily"    # daily | weekly | alternating
            hour = 0          # 0-23
            # dow = 0         # for weekly: 0=Sunday ... 6=Saturday
        }
    }
    
  3. Apply the configuration and observe the following output:
    Apply complete! Resources: 0 added, 1 changed, 0 destroyed.

How to Manage Automatic Backups for Vultr Cloud Compute The process of setting up and configuring a new server or service to make it ready for use. Automatic Backups for Vultr instances are scheduled point-in-time data recovery solutions that allow you to backup your Cloud Compute instances’ data with minimal…

How to Manage Automatic Backups for Vultr Cloud Compute The process of setting up and configuring a new server or service to make it ready for use. Automatic Backups for Vultr instances are scheduled point-in-time data recovery solutions that allow you to backup your Cloud Compute instances’ data with minimal…

Leave a Reply

Your email address will not be published. Required fields are marked *