Reverter um compartilhamento de arquivos para um estado anterior de snapshot
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
O guia a seguir mostra como reverter
uma instância, especificamente um compartilhamento de arquivo único em uma instância, para um estado de snapshot anterior.
Você precisa usar a operação revert?
O recurso de reversão de snapshot é uma operação irreversível, tanto para o sistema de arquivos
ativo quanto para os snapshots mais recentes da cadeia. Use o recurso de reversão com cuidado.
Para uma explicação mais detalhada, consulte Reverter para um estado de snapshot.
Todos os dados gravados após a criação do snapshot de destino são excluídos
no início do processo de reversão e não podem ser recuperados. Todos os snapshots
mais recentes que o snapshot de destino também são excluídos. Por exemplo,
snapshot1, snapshot2 e snapshot3 são criados sequencialmente. Reverter
a instância para o estado capturado em snapshot2 significa que todos os dados gravados
após snapshot2, bem como todos os snapshots feitos após a criação de
snapshot2, são excluídos no processo de reversão.
Embora uma operação de reversão possa levar até dois minutos para ser concluída, a limpeza dos
dados excluídos pode levar de seis horas a dez dias, dependendo do número
de arquivos envolvidos. É necessário aguardar a conclusão da operação de reversão antes de
iniciar outra operação de reversão.
INSTANCE_ID pelo nome da instância em que você quer
aplicar a operação revert. Por exemplo, my-instance-1.
SNAPSHOT_ID pelo nome do snapshot que você quer usar para
a operação revert. Por exemplo, my-snapshot-3.
LOCATION pelo local da instância. Por exemplo, us-central1.
É necessário aguardar a conclusão da operação de reversão antes de iniciar
outra operação de reversão para a instância. A reversão de operações pode levar até
dois minutos. No entanto, o processo de limpeza de dados e recuperação de espaço pode levar
de seis horas a dez dias para ser concluído. Durante esse processo, o espaço recuperado
fica disponível gradualmente enquanto a operação de limpeza é concluída
e todo o espaço recuperado fica disponível. Para mais informações, consulte
Limitações de snapshots.
[[["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-08-18 UTC."],[[["\u003cp\u003eThis guide explains how to revert a single file share within a Filestore instance to a previous snapshot state, using the \u003ccode\u003erevert\u003c/code\u003e operation.\u003c/p\u003e\n"],["\u003cp\u003eReverting to a snapshot is irreversible, deleting all data written after the target snapshot and any newer snapshots, so users should use this feature cautiously.\u003c/p\u003e\n"],["\u003cp\u003eThe revert process can take up to two minutes, but cleanup of deleted data can take between six hours and ten days, and only one revert operation can run on an instance at a time.\u003c/p\u003e\n"],["\u003cp\u003eOnly instances with a single file share can utilize the revert snapshot feature, and it is incompatible with Filestore multishares for GKE.\u003c/p\u003e\n"],["\u003cp\u003eTo revert a file share, users must unmount the share from clients and then use the \u003ccode\u003egcloud filestore instances revert\u003c/code\u003e command with the instance ID, target snapshot ID, and instance location.\u003c/p\u003e\n"]]],[],null,["# Revert a file share to a prior snapshot state\n\nThe following guide shows you how to [revert](/filestore/docs/reference/rest/v1/projects.locations.instances/revert)\nan instance, specifically a single file share within an instance, to a prior\nsnapshot state.\n\nShould you use the `revert` operation?\n--------------------------------------\n\nThe revert snapshot feature is an irreversible operation, both to the live file\nsystem and to the newer snapshots in the chain. Use the revert feature carefully.\nFor a more detailed explanation, see [Revert to a snapshot state](/filestore/docs/snapshots#revert-to-snapshot).\n\nAll data written after the creation of the target snapshot is deleted\nat the beginning of the revert process and cannot be recovered. All snapshots\nthat are newer than the target snapshot are also deleted. For example,\n`snapshot1`, `snapshot2`, and `snapshot3` are created sequentially. Reverting\nthe instance to the state captured in `snapshot2` means that all data written\nafter `snapshot2`, as well as all snapshots taken after the creation of\n`snapshot2`, are deleted in the revert process.\n\nWhile a revert operation can take up to two minutes to complete, cleanup of the\ndeleted data can take between six hours to ten days, depending on the number\nof files involved. You must wait for the revert operation to complete before\nstarting another revert operation.\n\nOnly instances with a single share can revert to a snapshot state. The revert\nsnapshot feature can't be combined with [Filestore multishares for GKE](/filestore/docs/multishares).\nFor more information, see [Snapshot feature limitations](/filestore/docs/snapshots#feature_limitations)\nor the [`gcloud filestore instances revert`](/sdk/gcloud/reference/filestore/instances/revert)\npage.\n\nUse gcloud CLI to revert a file share to a previous snapshot\n------------------------------------------------------------\n\n### gcloud CLI\n\nTo revert a file share to the state captured in a snapshot:\n\n1. Unmount the file share from clients:\n\n sudo umount \u003cvar translate=\"no\"\u003emount-point-directory\u003c/var\u003e\n\n2. Revert the file share to a snapshot state using the [`instances revert`](/sdk/gcloud/reference/filestore/instances/revert)\n command:\n\n gcloud filestore instances revert \u003cvar translate=\"no\"\u003eINSTANCE_ID\u003c/var\u003e \\\n --target-snapshot=\u003cvar translate=\"no\"\u003eSNAPSHOT_ID\u003c/var\u003e \\\n --location=\u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eINSTANCE_ID\u003c/var\u003e with the name of the instance where you want to apply the `revert` operation. For example, `my-instance-1`.\n - \u003cvar translate=\"no\"\u003eSNAPSHOT_ID\u003c/var\u003e with the name of the snapshot you want to use for the `revert` operation. For example, `my-snapshot-3`.\n - \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e with the location of the instance. For example, `us-central1`.\n\nYou must wait for the revert operation to complete before you can start\nanother revert operation for the instance. Revert operations can take up to\ntwo minutes. However, the data cleanup and space reclamation process can take\nbetween six hours to ten days to complete. During this process, the reclaimed\nspace becomes available gradually while the cleanup operation finishes\nand all reclaimed space is available. For more information, see\n[Snapshot limitations](/filestore/docs/snapshots#feature-limitations).\n\nWhat's next\n-----------\n\n- [Snapshots overview](/filestore/docs/snapshots)\n- [Restore a file from a snapshot](/filestore/docs/restore-file)\n- [Schedule Filestore enterprise snapshots](/filestore/docs/schedule-filestore-enterprise-snapshots)\n- [Backups overview](/filestore/docs/backups)"]]