Skip to content

Back up and restore servers on Google Cloud

Use this guide to restore from server snapshots and create backups using scheduled snapshots at Google Cloud.

Create a snapshot

Create a snapshot of your server’s disk that can be used to restore a server’s data to the instant the snapshot was taken.

  1. In Google Cloud console, go to the VM instances page.
  2. Click on the name of the server you want to snapshot.
  3. Scroll down to the Storage section.
  4. In the Name column, click on the name of the disk. The disk will usually have the same name as the server.
  5. Click Create snapshot.
    • If you don’t see Create snapshot, click on the three blue vertical dots to the left of the icon.
  6. In the Name field, enter a unique name for the snapshot that identifies the purpose of the snapshot, for example:
    • my-first-server-before-upgrade-to-ubuntu-2404
    • my-first-server-after-upgrade-to-ubuntu-2404
  7. Click Create.

Snapshot schedules

A snapshot schedule will automatically create hourly, daily, or weekly snapshots of a server’s disk. Additionally, a snapshot schedule can automatically delete old snapshots created by the snapshot schedule after a configurable number of days.

A snapshot schedule must be added to the disk of each server that should have snapshots taken based on the schedule.

You can use the same snapshot schedule on multiple servers.

Create a snapshot schedule

Create a daily snapshot schedule that retains snapshots for 90 days.

  1. In Google Cloud console, go to the Snapshots page.
  2. Click on Create snapshot schedule.
    • If you don’t see Create snapshot schedule, click on the three blue vertical dots to the left of the icon.
  3. Set the following values:
    • Name: daily-snapshots
    • Region: choose the region where you will create your server.
    • Schedule frequency: select Daily.
    • Autodelete snapshots after: 90 days.
  4. Click Create at the bottom of the page.

Add a snapshot schedule to a server

  1. In Google Cloud console, go to the VM instances page.
  2. Click on the name of the server to which you want to add a snapshot schedule.
  3. Scroll down to the Storage section.
  4. In the Name column, click on the name of the disk. The disk will usually have the same name as the server.
  5. Click Edit.
    • If you don’t see Edit, click on the three blue vertical dots to the left of the icon.
  6. In the Snapshot schedule field, select the snapshot schedule to use.
  7. Scroll to the bottom of the page and click Save.

See which servers have a snapshot schedule

  1. In Google Cloud console, go to the Snapshots page.
  2. Click on Snapshot schedules.
  3. Click on the name of the snapshot schedule.
  4. The In use by fields shows the disks that are using the snapshot schedule. The disk name is usually the same as the server name.

Remove a snapshot schedule from a server

  1. In Google Cloud console, go to the VM instances page.
  2. Click on the name of the server to which you want to add a snapshot schedule.
  3. Scroll down to the Storage section.
  4. In the Name column, click on the name of the disk. The disk will usually have the same name as the server.
  5. Click Edit.
    • If you don’t see Edit, click on the three blue vertical dots to the left of the icon.
  6. In the Snapshot schedule field, select No schedule.
  7. Scroll to the bottom of the page and click Save.

Delete a snapshot schedule

  1. In Google Cloud console, go to the Snapshots page.
  2. Click on Snapshot schedules.
  3. Click on the name of the snapshot schedule.
  4. Click Delete schedule.
    • If Delete schedule is disabled, the snapshot schedule is still in use. Remove the snapshot schedule from all disks where the snapshot schedule is in use before deleting the snapshot schedule.
    • If you don’t see Delete schedule, click on the three blue vertical dots to the left of the icon.

Restore a server from a snapshot

When restoring a server from a snapshot, a new server is created.

  1. In Google Cloud console, go to the VM instances page.
  2. Click Create instance.
  3. You’ll start out in the Machine configuration pane.
    • Choose a Name for the server. Only lowercase letters (a-z), numbers, and hyphens are allowed.
    • Choose a Region.
    • Leave Zone set to Any.
    • Choose a Machine type.
  4. Click on the OS and Storage pane.
    • In the Operating system and storage section, click Change.
    • Click Snapshots.
    • Select the snapshot to use.
    • For Boot disk type, select Balanced persistent disk.
    • The Size (GB) was automatically changed to the disk size of the snapshot you selected. You can increase this value, if desired.
  5. Click on the Data protection pane.
    • Select Snapshot schedules.
    • Choose the schedule named daily-snapshots.
  6. Click Create at the bottom of the page.

Delete snapshots

  1. In Google Cloud console, go to the Compute Engine Snapshots page.
  2. Check the box next to each snapshot you want to delete.
  3. Click Delete.
    • If Delete is disabled, confirm that you have checked the box next to at least one snapshot.
    • If you don’t see Delete, click on the three blue vertical dots to the left of the icon.