Restoring data with snapshots

Stay organized with collections Save and categorize content based on your preferences.

You can use snapshots to restore deleted or corrupted files and directories by using the file access operations for your operating system.

Restore data using a Linux client

Snapshots are accessible using the UNIX-like file system on Linux operating systems. After you enable Make snapshot directory (.snapshot) visible in your volume options, a directory called .snapshot appears in the mount point of the volumes.

The following example shows a sequence of file operations on a volume mounted to a Linux client. The volume contains two files and also one snapshot. In this example, the user deletes a file and uses the snapshot to restore the latest version of the file from the newest snapshot.

    $ df -h .

    Filesystem                      Size  Used  Avail Use%  Mounted on   1.0T  4.5M  1.0T    1%  /netapp

    $ ls

    chinook.db  readme.txt

    $ rm chinook.db

    $ ls -la .

    total 12
    drwxrwxrwx  2 root    root    4096 May 31 15:02 .
    drwxr-xr-x 20 root    root    4096 May 31 13:42 ..
    drwxrwxrwx  3 root    root    4096 May 31 14:35 .snapshot
    -rw-rw-r--  1 ubuntu  ubuntu    14 May 31 14:24 readme.txt

    $ ls .snapshot


    $ ls .snapshot/hourly.2022-05-31_1435

    chinook.db  readme.txt

    $ cp .snapshot/hourly.2022-05-31_1435/chinook.db .

    $ ls

    chinook.db  readme.txt

Restore data using a Windows client

When the Make snapshot directory (~snapshot) visible option is enabled in the volume options, you can access snapshots with the Previous Versions tab of the Windows Explorer property window. Snapshots appear in the Previous Versions tab with the timestamp of snapshot creation. For example, if you accidentally delete a file, you can restore it to its original location by dragging and dropping it from a snapshot folder.

You can also access snapshots using the hidden ~snapshot file path, as shown in the following example:

    Z:\dir z:\~snapshot
     Volume in drive Z is restore-example-1
     Volume Serial Number is 8080-F15D

     Directory of z:\~snapshot

    05/31/2022  04:08 PM    <DIR>        ..
    05/31/2022  03:59 PM    <DIR>        hourly.2022-05-31-1600
    05/31/2022  04:02 PM    <DIR>        hourly.2022-05-31_1605
                   0 File(s)            0 bytes
                   3 Dir(s)             0 bytes free

What's next