How to restore files stored on the CLAS Linux network from Linux
You must have a CLAS Linux environment.
Restores are only available on network attached storage (NAS), including your home directory, /group, etc., Restoration is NOT available on local file systems such as /var/tmp or /tmp.
To see whether your lost files are on NAS, do the following.
df . | grep netapp
lf the df command returns a string that contains clasnetappvm, then your lost files are on the CLAS Linux NAS and you can restore them. Otherwise, your files likely lost.
NAS on Linux clients is backed up via snapshot technology. Snapshots allow the recovery of files and directories that were deleted, corrupted or altered, without the intervention of the CLAS Linux Group staff.
A snapshot is a frozen, hidden, read-only view of files and folders at a specific point in time. The CLAS Linux Group have scheduled a number of different snapshots to help users with their restore needs, as follows:
- A hourly Snapshot is taken each hour. The last twenty four hourly Snapshots are available to view.
- A nightly Snapshot is taken each night at 12:00AM. Seven nights of nightly Snapshots are available to view.
- A weekly Snapshot is taken each Sunday at 12:00AM. Four weeks of weekly Snapshots are available to view.
- A monthly Snapshot is taken each month at 1:00AM on the first day of the month. Three monthly Snapshots are available to view.
To access snapshots, cd into the hidden, read-only .snapshot directory contained in each directory. If you've deleted a directory and are trying to restore the deleted directory, you'll need to cd up a level and access the higher-level .snapshot directory.
Snapshots in each .snapshot directory are named based upon the age of the snapshot, as follows:
hourly.date_hour or daily.date_hour or weekly.date_hour
The following example shows the commands a person would type to restore their .cshrc startup file:
[hawkid@l-lnx000 ~]$ cd .snapshot
[hawkid@l-lnx000 .snapshot]$ ls
drna1(1790987470)_csg.7948 hourly.2014-10-06_2000 nightly.2014-10-03_0000
hourly.2014-10-06_1100 hourly.2014-10-07_0800 nightly.2014-10-04_0000
hourly.2014-10-06_1200 hourly.2014-10-07_0900 nightly.2014-10-05_0000
hourly.2014-10-06_1300 hourly.2014-10-07_1000 nightly.2014-10-07_0000
hourly.2014-10-06_1400 hourly.2014-10-07_1100 weekly.2014-09-22_0000
hourly.2014-10-06_1500 nightly.2014-09-30_0000 weekly.2014-09-29_0000
hourly.2014-10-06_1600 nightly.2014-10-01_0000 weekly.2014-10-06_0000
To restore your .cshrc file from October 6, 2014 at 8 pm, you would do the following:
[hawkid@l-lnx000 .snapshot]$ cd hourly.2014-10-06_2000
[hawkid@l-lnx100 hourly.2014-10-06_2000]$ cp .cshrc ~hawkid/
If you still can't find the file or directory you're looking for, or if you are looking for files older than a week or two, faculty and staff can send an email to email@example.com.