Back up and restore data on an instance

This page describes how to back up and restore the data on your Vertex AI Workbench instance.

Back up the data

To back up data on a Vertex AI Workbench instance, you can take a snapshot of the underlying Compute Engine virtual machine (VM) data disk.

You can create a snapshot of your instance's data disk by using the Google Cloud console or the Google Cloud CLI:

Console

  1. In the Google Cloud console, go to the Instances page.

    Go to Instances

  2. Click the instance name.

  3. On the Instance details page, click View in Compute Engine to open VM details.

  4. In the Additional disks section, click the name of the data disk. The name of the data disk is in this format: INSTANCE_NAME-data-workspace.

  5. Click Create snapshot.

  6. In the Create a snapshot dialog, click Create.

Compute Engine creates a snapshot of the data disk.

gcloud

To create a snapshot by using the gcloud CLI, use the following command:

gcloud compute snapshots create SNAPSHOT_NAME \
    --source-disk=INSTANCE_NAME-data-workspace \
    --source-disk-zone=ZONE

Replace the following:

  • SNAPSHOT_NAME: a name for your snapshot
  • INSTANCE_NAME: the name of your instance
  • ZONE: the zone where your instance is located

Restore data from a snapshot

You can restore data on an instance by using a snapshot. When you restore data on an instance, Vertex AI Workbench deletes the existing data disk that is attached to the instance, creates a new data disk based on the snapshot, and attaches the new data disk to the instance.

To restore data from a snapshot by using the gcloud CLI, use the following command:

gcloud workbench instances restore INSTANCE_NAME \
    --snapshot-project=PROJECT_NAME \
    --snapshot=SNAPSHOT_NAME

Replace the following:

  • INSTANCE_NAME: the name of your instance
  • PROJECT_NAME: the project name where your instance is located
  • SNAPSHOT_NAME: the name of the snapshot to restore