Untuk memigrasikan data dan file dari satu instance Vertex AI Workbench ke instance lainnya,
pertimbangkan untuk menggunakan metode berikut:
Menggunakan GitHub: Salin data dan file Anda ke repositori GitHub
dengan menggunakan ekstensi Git untuk JupyterLab.
Menggunakan Cloud Storage dan terminal: Salin data dan file Anda ke Cloud Storage, lalu ke instance lain menggunakan terminal.
Menggunakan Cloud Storage dalam notebook JupyterLab:
Salin data dan file Anda ke Cloud Storage, lalu ke instance lain
dengan menjalankan perintah di dalam sel notebook instance masing-masing.
Panduan ini menjelaskan cara memigrasikan data dan file menggunakan
Cloud Storage dan terminal.
Persyaratan
Anda harus memiliki akses terminal ke instance Vertex AI Workbench.
Akses terminal ditetapkan secara manual saat Anda membuat instance. Setelan
akses terminal tidak dapat diubah setelah instance dibuat.
Sebelum memulai
Buat bucket Cloud Storage di project yang sama dengan tempat instance Vertex AI Workbench Anda berada.
Memigrasikan data Anda ke instance Vertex AI Workbench baru
Untuk memigrasikan data dan file ke instance Vertex AI Workbench baru
menggunakan Cloud Storage dan terminal, lakukan langkah-langkah berikut.
Di antarmuka JupyterLab instance Vertex AI Workbench, pilih File >
New > Terminal untuk membuka jendela terminal.
Gunakan gcloud CLI untuk menyalin data pengguna
ke bucket Cloud Storage. Contoh perintah berikut
menyalin semua file dari direktori /home/jupyter/ instance
ke direktori dalam bucket Cloud Storage.
Di antarmuka JupyterLab instance Vertex AI Workbench baru, pilih File >
New > Terminal untuk membuka jendela terminal.
Gunakan gcloud CLI untuk memulihkan data Anda di instance baru.
Contoh perintah berikut menyalin semua
file dari direktori Cloud Storage ke
direktori /home/jupyter/ instance baru Anda.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-18 UTC."],[],[],null,["# Migrate data to a new Vertex AI Workbench instance\n==================================================\n\nThis page describes how to migrate data and files from\nan existing Vertex AI Workbench instance to a new one.\n\nWhen to migrate\n---------------\n\nYou might need to migrate your data to\na new Vertex AI Workbench instance if\nyou can't upgrade the environment of your existing instance.\nSee the [requirements for upgrading the environment of\na Vertex AI Workbench instance](/vertex-ai/docs/workbench/instances/upgrade#requirements).\n\nMigration options\n-----------------\n\nTo migrate data and files from one Vertex AI Workbench instance to another,\nconsider using the following methods:\n\n- **Use GitHub**: Copy your data and files to a GitHub repository\n by using the Git extension for JupyterLab.\n\n- **Use Cloud Storage and the terminal**: Copy your data and files\n to Cloud Storage and then to another instance by using the terminal.\n\n- **Use Cloud Storage within JupyterLab notebooks**:\n Copy your data and files to Cloud Storage and then to another instance\n by running commands within your respective instances' notebook cells.\n\nThis guide describes how to migrate data and files by using\nCloud Storage and the terminal.\n\nRequirements\n------------\n\nYou must have terminal access to your Vertex AI Workbench instance.\nTerminal access is manually set when you create an instance. The\nterminal access setting cannot be changed after the instance is created.\n\nBefore you begin\n----------------\n\n[Create a Cloud Storage bucket](/storage/docs/creating-buckets)\nin the same project where your Vertex AI Workbench instance\nis located.\n\nMigrate your data to a new Vertex AI Workbench instance\n-------------------------------------------------------\n\nTo migrate data and files to a new Vertex AI Workbench instance\nby using Cloud Storage and the terminal, complete the following steps.\n\n1. In your Vertex AI Workbench instance's\n JupyterLab interface, select **File \\\u003e\n New \\\u003e Terminal** to open a terminal window.\n\n2. Use the [gcloud CLI](/cli) to copy your user data\n to a Cloud Storage bucket. The following example command\n copies all of the files from your instance's `/home/jupyter/` directory\n to a directory in a Cloud Storage bucket.\n\n ```bash\n gcloud storage cp /home/jupyter/* gs://BUCKET_NAMEPATH --recursive\n ```\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eBUCKET_NAME\u003c/var\u003e: the name of your Cloud Storage bucket\n - \u003cvar translate=\"no\"\u003ePATH\u003c/var\u003e: the path to the directory where you want to copy your files, for example: `/copy/jupyter/`\n3. [Create\n a Vertex AI Workbench instance](/vertex-ai/docs/workbench/instances/create).\n\n4. In your new Vertex AI Workbench instance's\n JupyterLab interface, select **File \\\u003e\n New \\\u003e Terminal** to open a terminal window.\n\n5. Use the gcloud CLI to restore your data on the new instance.\n The following example command copies all of\n the files from a Cloud Storage directory to the\n your new instance's `/home/jupyter/` directory.\n\n ```bash\n gcloud storage cp gs://BUCKET_NAMEPATH* /home/jupyter/\n ```\n\nWhat's next\n-----------\n\n- Learn how to [upgrade the environment of\n Vertex AI Workbench instances](/vertex-ai/docs/workbench/instances/upgrade).\n\n- Learn more about [using\n SSH access](/vertex-ai/docs/workbench/instances/ssh-access) to connect\n to your Vertex AI Workbench instance."]]