If you accidentally erase a file, you can usually recover it yourself using the recover command on the composers. Files are backed up every night. You can recover a file that has been on the server for up to 6 months.
NOTE: This process will only recover files from UD's Central UNIX server (Copland). It can recover files in your home directory or files located in /www/htdocs -- the filesystem used to serve out files from www.udel.edu.
Where to find the recover command
recover is located in the /opt/bin directory. By default, you should be able to find this command. However, if you see the following message:
recover: Command not found
You may need to type /opt/bin/recover to run the program.
How to recover a file
Note: This process will only recover files from the Central UNIX servers.
-
Log in to one of the UNIX servers.
-
Change into the directory where the file used to reside.
For example, if you want to recover a file that used to reside in a folder you created and named data, at the UNIX prompt, type
cd data
and press the ENTER key. You are now in your data directory.
- Start the recover program.
At the UNIX prompt, and while working in the directory in which the original file resided, type
recover
and press the ENTER key. It might take up to a minute for the recover> prompt to appear. It should look similar to

- Get a list of files available to recover.
At the recover> prompt, type
ls -a
and press the ENTER key. You will see a list of files. For example, if you are in the data directory then the files will have the same names as the folders in your directory.
- Get the versions of the file you want to recover.
At the recover> prompt, type
versions
filename
replacing filename with the name of the file you wish to recover then press ENTER. A list of versions of the file saved on different dates appears. You should see a display similar to this one when looking for the versions of the folder class in the data directory:

In this example, the most recent version of "class" saved on February 21, 2002 is the largest version with a size of 1584. The size of the file is displayed on the same line as the name of the file, right before the date.
- Select the correct version of the file you want to recover.
Find the date just prior to the date on which your file disappeared. If the most recently backed-up version is the version you want to recover, proceed to step 7 (add).
If, however, the most recently backed-up version is not the one you want to recover, use the changetime command to indicate which date you want. Note: Use the save time:, not the creation date, to determine which date and time to use with the changetime command. For the previous example, at the recover> prompt, type
changetime feb
21 02:02 2002
and press ENTER to enable the recover program to use the version saved on February 21 at 02:01:17. Note that this process may take a few minutes. Before you proceed to the next step, you must wait until the system displays the prompt, Time changed to....
Also note that, for the changetime command, you need to type a time just past the save time:.
- Now add the file to create the list of files you want to recover.
At the recover> prompt, type
add
filename
replacing filename with the name of the file you want to recover and press ENTER. You can check to see that the correct files are selected by typing
list
at the recover> prompt and pressing ENTER. You should see a display similar to the following:

If you have more files to recover from the same changetime, go back to step 7: otherwise, go back to step 6. Continue this process until all files have been added to the recover list.
Other recover commands help you prepare to recover your file. For example, you can use relocate directoryname to recover a file into a different directory, or delete filename to remove a file from the recover list. To see a list of additional commands and a terse explanation of their function, at the recover> prompt, type:
help
and press ENTER. You should see a display similar to the following:

- Recover your files.
At the recover> prompt, type:
recover
and press the ENTER key. After typing this command, it might take a long time (5-40 minutes) for the program to find the files and reload them.
- Remember, if any file has the same name as a file you plan to recover, rename it so that the recovered file does not replace the current one.
When prompted, type R to rename the file. This will create the file filename.R where filename is name of the file you are recovering.
For example, if you are recovering a data folder named class, typing R to rename it will create class.R as the recovered file.
- Exit from the recover program.
When the recover> prompt reappears, your files should have been recovered, and you can exit the command. Type:
quit
at the recover> prompt then press the ENTER key. The next sample screen displays the commands to recover the most recent versions of the files class and read-mail that are mail folders in mail directory.
