The Recover Command

University of Wisconsin Madison

Computer Systems Lab CS1000

Wiscinfo
Wiscinfo
CS Home
CS Home
CSL
CSL
Feedback
CS1000
Feedback
Feedback



next up previous contents index
Next: Mail Up: The File System Previous: Disk Quotas

The recover command -
recovers a day old copy of your files

   

Please use the recover command to restore files from your backup volume. If you lost a file called main.c in the current directory, you could recover it by typing "recover fetch main.c".

How to recover files from your AFS backup volume

Every night, starting at midnight, backup volumes are made for every AFS volume in our cell. This is done to make dumps runs efficiently and also to make it easier to predict what is on the tape.

As a service to our users, we keep this backup volume around. You can recover files that you have lost until the next snapshot is taken (usually at midnight**).

The recover command is used to list what is in the backup volume and to fetch files and directories from there. Here are a few examples on how to use it:

% ls -l
total 2
drwxr-xr-x   2 tim      tim          2048 Jan  8 10:32 RCS/
% recover list -l
Listing of snapshot created at Mon Jan  8 00:11:22 1996.
total 12
drwxr-xr-x   2 afsadmin tim          2048 Nov  5 12:37 RCS
-rwxr-xr-x   1 afsadmin tim          6030 Oct  2 14:58 recover
-rw-r--r--   1 tim      tim          3542 Sep 13 11:03 recover.man
% recover fetch 'recover*'
Recovering files from snapshot created at Mon Jan  8 00:11:22 1996.
% ls -l
total 12
drwxr-xr-x   2 tim      tim          2048 Jan  8 10:32 RCS/
-rwxr-xr-x   1 tim      tim          6030 Oct  2 14:58 recover*
-rw-r--r--   1 tim      tim          3542 Sep 13 11:03 recover.man

Recovering a subdirectory:

% ls -l
total 11
-rwxr-xr-x   1 tim      1528         6030 Oct  2 14:58 recover*
-rw-r--r--   1 tim      1528         3542 Sep 13 11:03 recover.man
% recover list -l
Listing of snapshot created at Mon Jan  8 00:11:22 1996.
total 11
total 14
drwxr-xr-x   2 afsadmin 1528         2048 Nov  5 12:37 RCS
-rwxr-xr-x   1 afsadmin 1528         6030 Oct  2 14:58 recover
-rw-r--r--   1 tim      1528         3542 Sep 13 11:03 recover.man
% recover list -l RCS
Listing of snapshot created at Mon Jan  8 00:11:22 1996.
total 12
-r-xr-xr-x   1 afsadmin 1528         6791 Sep 11 19:47 recover,v
-r--r--r--   1 tim      1528         3264 Sep  8 15:52 recover.man,v
% recover fetch RCS
Recovering files from snapshot created at Mon Jan  8 00:11:22 1996.            
% ls -l RCS
total 12
-r-xr-xr-x   1 tim      1528         6791 Sep 11 19:47 recover,v*
total 12
-r--r--r--   1 tim      1528         3264 Sep  8 15:52 recover.man,v

The target of the fetch or list subcommand can be a file or a directory. The fetch subcommand will recursively process directories to restore all of the files within. You can use wild-cards, but they must be quoted to prevent then being interpreted by your shell. Consult the recover man page for additional information.  



Caitlin Howell
Thu Jan 16 20:24:40 CST 1997