If your CIS Unix home directory is on "War"
or "Peace" (the Network Appliance fileservers),
you can use the snap_restore program to
possibly restore files that you deleted or otherwise messed up.
Almost all users have their home directories on War or Peace.
What are snapshots?
A ``snapshot'' is a complete copy of a filesystem. The fileservers take snapshots of their filesystems at midnight, each midnight snapshot is maintained for three weeks. During the day, snapshots are taken at 8am, noon, 4pm, and 8pm; each of these snapshots is kept on disk for 32-40 hours.
Whether you can retrieve a file depends on (a) whether it existed in your home directory when one or more snapshots were taken; (b) whether any of those snapshots are still available.
Snapshots are kept in the magic directory .snapshot, which
is accessible from any directory served
by the fileserver.
How do I get a deleted file back?
The easiest way to restore a file from the snapshot area is to:
-
Use the
cdcommand, if necessary, to go to the directory from where you deleted the file. -
Give the command
% snap_restore filename(Substituting the name of the file you want restored for filename.)
This will look for your file in all the online snapshots, and (if found) offer to restore it for you. If multiple versions of the file are found, you'll be given a choice about which to restore.
Could I see an example?
Why sure.
Here's what it looks like when only one version of the lost file is found in the snapshot directories:
% snap_restore .signature
Looking for .signature in saved snapshots...
Found .signature in snapshots:
6 bytes, modified 01/24/97 16:20:29
Restore .signature? (y/n): y
Restoring file ... done!
Here's what it looks like when more than one version of the lost file is found in the snapshot directories:
% snap_restore TicTacToe.java
Looking for TicTacToe.java in saved snapshots...
Found 2 (possibly different) copies of TicTacToe.java in snapshots:
1: 7528 bytes, modified 04/26/96 13:19:34
2: 7546 bytes, modified 02/06/97 12:33:35
Enter the number of the file to restore, anything else to abort: 2
Restoring file ... done!
What if it doesn't work?
First the bad news: if your file was not on disk long enough to have been saved in a snapshot, you're probably out of luck. Sorry.
But if the problem is that your file has disappeared from the snapshots because you waited too long to restore it, all is not lost. We still do nightly backups of user directories to tape, and we can probably restore the file if it was on disk during a backup. Enter the following information on the CIS Help Desk Questions web page.
- the name of the file (including its path from your home directory, if any);
- the date it was deleted; and
- the date the file was last modified (before the date it was deleted).
(It doesn't matter if you don't know some of these things exactly; just give your best guess.)
We'll let you know the results of your request via email.
Page Maintenance: Paul A. Sand <pas@unh.edu> Last modified: 2012-05-07 8:56 AM EDT
[W3C Validator]

