Stay organized with collections
Save and categorize content based on your preferences.
The following guide shows you how to revert
an instance, specifically a single file share within an instance, to a prior
snapshot state.
Should you use the revert operation?
The revert snapshot feature is an irreversible operation, both to the live file
system and to the newer snapshots in the chain. Use the revert feature carefully.
For a more detailed explanation, see Revert to a snapshot state.
All data written after the creation of the target snapshot is deleted
at the beginning of the revert process and cannot be recovered. All snapshots
that are newer than the target snapshot are also deleted. For example,
snapshot1, snapshot2, and snapshot3 are created sequentially. Reverting
the instance to the state captured in snapshot2 means that all data written
after snapshot2, as well as all snapshots taken after the creation of
snapshot2, are deleted in the revert process.
While a revert operation can take up to two minutes to complete, cleanup of the
deleted data can take between six hours to ten days, depending on the number
of files involved. You must wait for the revert operation to complete before
starting another revert operation.
INSTANCE_ID with the name of the instance where you want to
apply the revert operation. For example, my-instance-1.
SNAPSHOT_ID with the name of the snapshot you want to use for
the revert operation. For example, my-snapshot-3.
LOCATION with the location of the instance. For example,
us-central1.
You must wait for the revert operation to complete before you can start
another revert operation for the instance. Revert operations can take up to
two minutes. However, the data cleanup and space reclamation process can take
between six hours to ten days to complete. During this process, the reclaimed
space becomes available gradually while the cleanup operation finishes
and all reclaimed space is available. For more information, see
Snapshot limitations.
[[["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-08-28 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)"]]