Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Panduan berikut menunjukkan cara memulihkan setiap file dari snapshot.
Serupa dengan mengembalikan instance,
menggunakan snapshot untuk memulihkan satu file adalah operasi destruktif. Gunakan fitur ini dengan cermat. Untuk deskripsi mendetail tentang batasan snapshot, lihat Batasan fitur snapshot.
gcloud CLI
Untuk memulihkan file ke status sebelumnya yang diambil dalam snapshot, jalankan
perintah berikut dari VM klien yang memiliki instance yang dipasang:
[[["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."],[[["\u003cp\u003eThis guide demonstrates how to restore a single file from a snapshot using the \u003ccode\u003egcloud CLI\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eRestoring a file from a snapshot is a destructive operation, similar to reverting an instance.\u003c/p\u003e\n"],["\u003cp\u003eTo restore a file, use the \u003ccode\u003esudo cp -pa\u003c/code\u003e command on a client VM with the instance mounted, specifying the snapshot ID and file path.\u003c/p\u003e\n"],["\u003cp\u003eEnsure you are aware of the snapshot feature limitations before proceeding with file restoration.\u003c/p\u003e\n"]]],[],null,["# Restore an individual file from a snapshot\n\nThe following guide shows how to restore an individual file from a snapshot.\n\nSimilar to [reverting an instance](/sdk/gcloud/reference/filestore/instances/revert),\nusing a snapshot to restore a single file is a destructive operation. Use this\nfeature carefully. For a detailed description of snapshot limitations,\nsee [Snapshot feature limitations](/filestore/docs/snapshots#feature_limitations). \n\n### gcloud CLI\n\nTo restore a file to a previous state that's captured in a snapshot, run the\nfollowing command from a client VM that has the instance mounted: \n\n sudo cp -pa \u003cvar translate=\"no\"\u003eMOUNT-POINT-DIRECTORY\u003c/var\u003e/.snapshot/\u003cvar translate=\"no\"\u003eSNAPSHOT_ID\u003c/var\u003e/\u003cvar translate=\"no\"\u003eFILE\u003c/var\u003e \u003cvar translate=\"no\"\u003eMOUNT-POINT-DIRECTORY\u003c/var\u003e\n\n#### Example\n\nIf you want to restore file `mount-point-directory/genomics-file.txt` to the state preserved\nin snapshot `snap2`, run: \n\n sudo cp -pa mount-point-directory/.snapshot/snap2/genomics-file.txt mount-point-directory/\n\nWhat's next\n-----------\n\n- [Snapshots overview](/filestore/docs/snapshots)\n- [Revert an instance to a prior snapshot state](/filestore/docs/revert-snapshot)\n- [Schedule Filestore enterprise snapshots](/filestore/docs/schedule-filestore-enterprise-snapshots)\n- [Backups overview](/filestore/docs/backups)"]]