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
In the Google Cloud console, go to the Instances page.
Click the instance name.
On the Instance details page, click View in Compute Engine to open VM details.
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
.Click Create snapshot.
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 snapshotINSTANCE_NAME
: the name of your instanceZONE
: 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 instancePROJECT_NAME
: the project name where your instance is locatedSNAPSHOT_NAME
: the name of the snapshot to restore