Para migrar dados e arquivos de uma instância de notebooks gerenciados pelo usuário para outra,
considere usar os seguintes métodos:
Usar o GitHub: copie seus dados e arquivos para um repositório do GitHub
usando a extensão Git para JupyterLab.
Para usar esse método,
consulte Salvar um notebook no
GitHub (em inglês).
Use o Cloud Storage e o terminal: copie seus dados e arquivos para o Cloud Storage e, em seguida, para outra instância usando o terminal.
Use o Cloud Storage nos notebooks do JupyterLab:
copie seus dados e arquivos para o Cloud Storage e depois para outra instância
executando comandos nas células de notebook das respectivas instâncias.
Neste guia, descrevemos como migrar dados e arquivos usando o Cloud Storage e o terminal.
Requisitos
Você precisa ter acesso ao terminal da sua instância de notebooks gerenciados pelo usuário.
O acesso ao terminal é definido manualmente durante a criação de uma instância. Não é possível alterar a configuração de acesso ao terminal após a criação da instância.
Migrar os dados para uma nova instância de notebooks gerenciados pelo usuário
Para migrar dados e arquivos para uma nova instância de notebooks gerenciados pelo usuário
usando o Cloud Storage e o terminal, conclua as etapas a seguir.
Na interface do JupyterLab da instância gerenciada pelos usuários, selecione File > New > Terminal para abrir uma janela de terminal.
Ou conecte-se ao terminal da instância
usando SSH.
Use a gcloud CLI para copiar os dados do usuário
para um bucket do Cloud Storage. O exemplo de comando a seguir
copia todos os arquivos do diretório /home/jupyter/ da instância
para um diretório em um bucket do Cloud Storage.
Na interface da nova instância do Notebooks gerenciada pelo novo usuário do JupyterLab, selecione Arquivo >
Novo > Terminal para abrir uma janela de terminal.
Use a gcloud CLI para restaurar os dados na nova instância.
O comando de exemplo a seguir copia todos os arquivos de um diretório do Cloud Storage para o diretório /home/jupyter/ da sua nova instância.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-09-02 UTC."],[],[],null,["# Migrate data to a new Vertex AI Workbench user-managed notebooks instance\n\nMigrate data to a new user-managed notebooks instance\n=====================================================\n\n\n| Vertex AI Workbench user-managed notebooks is\n| [deprecated](/vertex-ai/docs/deprecations). On\n| April 14, 2025, support for\n| user-managed notebooks will end and the ability to create user-managed notebooks instances\n| will be removed. Existing instances will continue to function\n| but patches, updates, and upgrades won't be available. To continue using\n| Vertex AI Workbench, we recommend that you\n| [migrate\n| your user-managed notebooks instances to Vertex AI Workbench instances](/vertex-ai/docs/workbench/user-managed/migrate-to-instances).\n\n\u003cbr /\u003e\n\nThis page describes how to migrate data and files from\nan existing user-managed notebooks instance to a new one.\n\nWhen to migrate\n---------------\n\nYou might need to migrate your data to\na new user-managed notebooks instance if\nyou can't upgrade the environment of your existing instance.\nSee the [requirements for upgrading the environment of\na user-managed notebooks instance](/vertex-ai/docs/workbench/user-managed/upgrade#requirements).\n\nMigration options\n-----------------\n\nTo migrate data and files from one user-managed notebooks 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 To use this method,\n see [Save a notebook to\n GitHub](/vertex-ai/docs/workbench/user-managed/save-to-github).\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 user-managed notebooks 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 user-managed notebooks instance\nis located.\n\nMigrate your data to a new user-managed notebooks instance\n----------------------------------------------------------\n\nTo migrate data and files to a new user-managed notebooks instance\nby using Cloud Storage and the terminal, complete the following steps.\n\n1. In your user-managed notebooks instance's\n JupyterLab interface, select **File \\\u003e\n New \\\u003e Terminal** to open a terminal window.\n\n Or connect to your instance's terminal\n by [using SSH](/vertex-ai/docs/workbench/user-managed/ssh-access).\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 user-managed notebooks instance](/vertex-ai/docs/workbench/user-managed/create-new).\n\n4. In your new user-managed notebooks 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 [automatically and manually upgrade the environment of\n user-managed notebooks instances](/vertex-ai/docs/workbench/user-managed/upgrade).\n\n- Learn more about [using\n SSH access](/vertex-ai/docs/workbench/user-managed/ssh-access) to connect\n to your user-managed notebooks instance."]]