Body
Overview
One useful feature of our Arts and Sciences Standard Linux is the ability to restore previous versions of files out to 30 days. The Remote NFS file server will take snapshots of a user's home directory and a research group's data directory every 24 hours.
This procedure also works for Macs mounting the central storage from asc-files.
- What file systems can I restore files from snapshot on?
- How to restore a previous version of a file on ASC standard Linux
What file systems can I restore files from snapshot on?
Files can be restored from snapshots from a user's home directory on an ASC standard Linux machine and from a research group's remote NFS file system. Snapshots are not taken on the local storage of a workstation. The easiest way to tell if your current directory has snapshot functionality is to cd
into the .snapshot directory.
$ cd .snapshot
How to restore a previous version of a file on ASC standard Linux
Restoring a file from a snapshot within the previous 7 days
Snapshots are contained within the .snapshot folder of any directory. Seven days worth of snapshots are kept in this directory. The .snapshot folder will not show up in the listing of the ls
command even with the .a
argument.
To access the .snapshot directory:
$ cd .snapshot
Inside the .snapshot directory, there will be an INDEX directory and snapshots every 24 hours going back seven days.
Example .snapshot directory
../.snapshot$ ls
Index-Snapshot-Current-1712073615 nfs-projects_7D_2024-03-28_06:00 nfs-projects_7D_2024-03-30_06:00 nfs-projects_7D_2024-04-01_06:00 nfs-projects_7D_2024-03-27_06:00 nfs-projects_7D_2024-03-29_06:00 nfs-projects_7D_2024-03-31_06:00 nfs-projects_7D_2024-04-02_06:00
Note: The base directory of a file system, such as a home folder or a research group data directory, will have all seven snapshots, even if some are empty due to no filesystem changes from that snapshot run. If your directory is nested within the file system, the .snapshot directory within it will only contain a link to a snapshot if that snapshot has a different state than the current directory.
In order to restore a file, pick a specific snapshot directory that was taken before a known good date and cd
into it.
../.snapshot$ cd nfs-projects_7D_2024-03-31_06\:00/
From here use the cp
command to copy the desired file. (The .snapshot folder is read-only, so the mv
command will not work).
cp ../.snapshot/nfs-projects_7D_2024-03-31_06:00$ cp -i examplefile /(path you want to copy file to)/examplefile
Now you have restored your file from the snapshot to its new location.
Restoring a file from a snapshot in the last 30 days
Please email asctech@osu.edu with the path to the file you would like restored, a known good date within the previous 30 days and a path/name you would like to place the restored file on your file system.