Sign in to your Google Cloud account. If you're new to
Google Cloud,
create an account to evaluate how our products perform in
real-world scenarios. New customers also get $300 in free credits to
run, test, and deploy workloads.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
To get the permissions that
you need to mount a Cloud Storage bucket to a Vertex AI Workbench instance,
ask your administrator to grant you the
following IAM roles on the project:
Vertex AI Workbench instances include a Cloud Storage integration
that lets you mount a Cloud Storage bucket. This means you can
browse the contents of the bucket and work with compatible files from within
the JupyterLab interface.
You can access any of the Cloud Storage buckets and files that
your instance has access to within the same project as
your Vertex AI Workbench instance.
Required permission for enabling shared storage mounting
To enable shared storage mounting in your Vertex AI Workbench instance,
ask your administrator to grant your Vertex AI Workbench instance's
service account the storage.buckets.list permission on the project.
The storage.buckets.list permission is required for the
Mount shared storage button to appear in the JupyterLab interface of your
Vertex AI Workbench instance.
Create a bucket and a Vertex AI Workbench instance
You must have access to at least one Cloud Storage bucket in the
same project as your Vertex AI Workbench instance.
If you need to create a Cloud Storage bucket,
see Create a bucket.
Next to your Vertex AI Workbench instance's name,
click Open JupyterLab.
Your Vertex AI Workbench instance opens JupyterLab.
Mount the Cloud Storage bucket
To mount and then access a Cloud Storage bucket, do the following:
In JupyterLab, make sure the
folderFile Browser tab
is selected.
In the left sidebar, click the
Mount
shared storage button. If you don't see the button, drag the right side
of the sidebar to expand the sidebar until you see the button.
In the Bucket name field, enter the Cloud Storage
bucket name that you want to mount.
Click Mount.
Your Cloud Storage bucket appears as a folder in the
File browser tab of the left sidebar. Double-click the folder
to open it and browse the contents.
Export to and restore files from Cloud Storage
This section describes how to export files to Cloud Storage and
restore files located in a Cloud Storage bucket.
Export to Cloud Storage
In the Google Cloud console, go to the Instances page.
Next to your Vertex AI Workbench instance's name,
click Open JupyterLab.
Your Vertex AI Workbench instance opens JupyterLab.
In JupyterLab, make sure the
folderFile Browser tab
is selected.
In the left sidebar, click the
Export
to GCS button. If you don't see the button, drag the right side
of the sidebar to expand the sidebar until you see the button.
In the Provide export location dialog, enter a
Cloud Storage bucket name that you want to export files to.
If you need to create a Cloud Storage bucket,
see Create a bucket.
Vertex AI Workbench opens a new notebook that includes code
for exporting your instance's files to Cloud Storage.
Run the code in this cell.
Restore files from Cloud Storage
To restore a file to your Vertex AI Workbench instance, you can use
gcloud storage cp to copy the file.
Run the following code in a cell of one of your instance's notebooks:
!gcloudstoragecpURI/home/jupyter/FILE_NAME
Replace the following:
URI: the gsutil URI of the file that you want to
copy, for example:
gs://BUCKET_NAME/ZONE/INSTANCE_ID/FILE_NAME
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Back up and restore files by using Cloud Storage\n================================================\n\nThis page describes how to use Cloud Storage to back up and restore files\non your Vertex AI Workbench instance.\n\nOverview\n--------\n\nThis guide describes two ways to use Cloud Storage to help you\nback up and restore files on your Vertex AI Workbench instance:\n\n- [Mount a Cloud Storage bucket](#mount-bucket) to\n your Vertex AI Workbench instance.\n\n- [Export your files to Cloud Storage](#export-to-storage)\n and then restore them.\n\nBefore you begin\n----------------\n\n- Sign in to your Google Cloud account. If you're new to Google Cloud, [create an account](https://console.cloud.google.com/freetrial) to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Notebooks API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=notebooks.googleapis.com&redirect=https://console.cloud.google.com)\n\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Notebooks API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=notebooks.googleapis.com&redirect=https://console.cloud.google.com)\n\n\u003cbr /\u003e\n\n### Required roles\n\n\nTo get the permissions that\nyou need to mount a Cloud Storage bucket to a Vertex AI Workbench instance,\n\nask your administrator to grant you the\nfollowing IAM roles on the project:\n\n- [Notebooks Runner](/iam/docs/roles-permissions/notebooks#notebooks.runner) (`roles/notebooks.runner`)\n- [Storage Object User](/iam/docs/roles-permissions/storage#storage.objectUser) (`roles/storage.objectUser`)\n\n\nFor more information about granting roles, see [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n\n\nYou might also be able to get\nthe required permissions through [custom\nroles](/iam/docs/creating-custom-roles) or other [predefined\nroles](/iam/docs/roles-overview#predefined).\n\nMount a Cloud Storage bucket\n----------------------------\n\nVertex AI Workbench instances include a Cloud Storage integration\nthat lets you mount a Cloud Storage bucket. This means you can\nbrowse the contents of the bucket and work with compatible files from within\nthe JupyterLab interface.\n\nYou can access any of the Cloud Storage buckets and files that\nyour instance has access to within the same project as\nyour Vertex AI Workbench instance.\n| **Note:** Your Vertex AI Workbench instance's access to Cloud Storage is determined by the single user or service account that you used to grant access to your instance. For example, if you granted a specific service account access to your instance, you must also grant that service account access to the Cloud Storage buckets that you want to use in JupyterLab.\n\n### Required permission for enabling shared storage mounting\n\nTo enable shared storage mounting in your Vertex AI Workbench instance,\nask your administrator to grant your Vertex AI Workbench instance's\nservice account the `storage.buckets.list` permission on the project.\n\nThe `storage.buckets.list` permission is required for the\n**Mount shared storage** button to appear in the JupyterLab interface of your\nVertex AI Workbench instance.\n\n### Create a bucket and a Vertex AI Workbench instance\n\nYou must have access to at least one Cloud Storage bucket in the same project as your Vertex AI Workbench instance.\n\n1. If you need to create a Cloud Storage bucket, see [Create a bucket](/storage/docs/creating-buckets).\n2. If you haven't already, [create a Vertex AI Workbench instance](/vertex-ai/docs/workbench/instances/create) in the same project as your Cloud Storage bucket.\n\n### Open JupyterLab\n\n1. In the Google Cloud console, go to the **Instances** page.\n\n\n [Go to Instances](https://console.cloud.google.com/vertex-ai/workbench/instances)\n2. Next to your Vertex AI Workbench instance's name,\n click **Open JupyterLab**.\n\n Your Vertex AI Workbench instance opens JupyterLab.\n\n### Mount the Cloud Storage bucket\n\nTo mount and then access a Cloud Storage bucket, do the following:\n\n1. In JupyterLab, make sure the\n folder **File Browser** tab\n is selected.\n\n2. In the left sidebar, click the\n **Mount\n shared storage** button. If you don't see the button, drag the right side\n of the sidebar to expand the sidebar until you see the button.\n\n\n3. In the **Bucket name** field, enter the Cloud Storage\n bucket name that you want to mount.\n\n4. Click **Mount**.\n\n5. Your Cloud Storage bucket appears as a folder in the\n **File browser** tab of the left sidebar. Double-click the folder\n to open it and browse the contents.\n\nExport to and restore files from Cloud Storage\n----------------------------------------------\n\nThis section describes how to export files to Cloud Storage and\nrestore files located in a Cloud Storage bucket.\n\n### Export to Cloud Storage\n\n1. In the Google Cloud console, go to the **Instances** page.\n\n\n [Go to Instances](https://console.cloud.google.com/vertex-ai/workbench/instances)\n2. Next to your Vertex AI Workbench instance's name,\n click **Open JupyterLab**.\n\n Your Vertex AI Workbench instance opens JupyterLab.\n3. In JupyterLab, make sure the\n folder **File Browser** tab\n is selected.\n\n4. In the left sidebar, click the\n **Export\n to GCS** button. If you don't see the button, drag the right side\n of the sidebar to expand the sidebar until you see the button.\n\n5. In the **Provide export location** dialog, enter a\n Cloud Storage bucket name that you want to export files to.\n If you need to create a Cloud Storage bucket,\n see [Create a bucket](/storage/docs/creating-buckets).\n\n Vertex AI Workbench opens a new notebook that includes code\n for exporting your instance's files to Cloud Storage.\n6. Run the code in this cell.\n\n### Restore files from Cloud Storage\n\nTo restore a file to your Vertex AI Workbench instance, you can use\n[gcloud storage cp](/sdk/gcloud/reference/storage/cp) to copy the file.\n\nRun the following code in a cell of one of your instance's notebooks: \n\n```bash\n!gcloud storage cp URI /home/jupyter/FILE_NAME\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eURI\u003c/var\u003e: the gsutil URI of the file that you want to copy, for example: gs://\u003cvar translate=\"no\"\u003eBUCKET_NAME\u003c/var\u003e/\u003cvar translate=\"no\"\u003eZONE\u003c/var\u003e/\u003cvar translate=\"no\"\u003eINSTANCE_ID\u003c/var\u003e/\u003cvar translate=\"no\"\u003eFILE_NAME\u003c/var\u003e\n- \u003cvar translate=\"no\"\u003eFILE_NAME\u003c/var\u003e: the name of the file to copy\n\nFor more information, see [Download the object from your\nbucket](/storage/docs/discover-object-storage-gcloud).\n\nWhat's next\n-----------\n\n- [Use a snapshot to back up and restore data](/vertex-ai/docs/workbench/instances/restore-snapshot)\n\n- [Save a notebook to GitHub](/vertex-ai/docs/workbench/instances/save-to-github)"]]