Recovering your own files
Files that are stored in your personal area (eg your H drive or My Documents), or on a Research or Departmental area, can be quickly and easily recovered using our 'Previous Versions' feature, and usually without assistance from Computing Services.
Note: If you are trying to recover an entire folder, it is most often the case that it has been accidentally dragged and dropped into another folder rather than actually deleted, so it is worth searching your top level drive for missing folders, before attempting to recover them, otherwise you will create duplicate folders on your filestore which will add confusion later. This is especially important if a folder has gone missing from a shared area.
When can I recover my own files
- When a file has become corrupt
- When its been deleted
- When you have saved over it
Please note that files can only be recovered if they have existed on University filestore for long enough to be captured by one of the snapshot or backup mechanisms we use. Snapshots are typically taken at 7am and 1pm, and backups run overnight on all filestores. Therefore please be aware there are short periods of time in a day, where a file can be created and deleted before it has been captured by one of the backup mechanisms.
There are 2 methods to recover files under Windows.
Important: These recovery methods only apply to University Network Drives such as your H Drive or the X drive. It does not apply to the C drive of your local computer.
- Snapshot - this method enables you to use the automatic daily back-up to find previous versions of your file.
- Previous versions - This method keeps the files based on saved versions.
Using the 'Previous versions' feature
Typically this method will allow you to recover a file from the last 14 days. This method gives you the option of recovering a previous version of a file or folder, by selecting it from a list of saved versions.
- Open Windows Explorer (Windows explorer can be found by right clicking on the start button and choosing Open Windows Explorer)
2. Navigate to the folder that contans the file you wish to recover
3. Right click on the folder which contains the file you wish to recover, click "Properties", then select the "Previous Versions" tab (See image below).
Note this example shows the recovery of a file in your personal H drive, but the procedure from other drives (eg the X drive) is identical.
4. In the window that appears, you will see a list of snapshots with the time and date the snapshot was taken. Click on the entry you desire to highlight it, and click Open (or View in Windows XP)
5. You will now see the folder exactly as it was on the date and time you chose. This will be indicated via the address bar which will show the folder's date and time in brackets.
6. Select the file, files or folder you wish to recover by clicking (or shift+click/control+click for multiple files or blocks of files), then copy and paste the files to your desired location to restore them.
Take care if using the Restore button, as this will restore the entire folder, and will overwrite anything that has since changed.
Using the hidden .snapshot folder for file recovery
You can also recover files by accessing the hidden .snapshot folder, which is accessible in every directory of University filestore. This folder is usually hidden and is read-only.
To access the snapshot folder
- Navigate to the parent folder that contains the deleted or overwritten files
- add \.snapshot to the end of the path in the address bar.
- Open a snapshot folder and recover the files:
Notes on Previous Versions
- This feature currently maintains snapshots for the most recent 14 days. Recovery of files older than this period will need to be recovered from tape. Please fill out the form for requests older than 14 days
- It exists on virtually all areas of University Filestore, but there may be one or two older areas of Research Data for which this feature is not currently supported.
- This feature is not available for email restores.
First you must log into one of the Unix servers.
shell> is used to denote the UNIX shell prompt and does not need to be typed as part of the command
In every folder there is a hidden directory called '.snapshot'. This is hidden from even the
shell> ls -a
command. This is to prevent accidental deletion or inclusion in directory traversal commands such as 'find'.
To search for a previous version or deleted file called 'myfile', change directory to the place on the filesystem where the file used to reside and then type the following command:
shell> ls -lut .snapshot/*/myfile
The result should be something like the following:
-rw-r--r-- 1 user group Aug 15 00:00 .snapshot/nightly.0/myfile
-rw-r--r-- 1 user group Aug 14 19:00 .snapshot/hourly.0/myfile
-rw-r--r-- 1 user group Aug 14 15:00 .snapshot/hourly.1/myfile
-rw-r--r-- 1 user group Aug 10 00:00 .snapshot/nightly.4/myfile
-rw-r--r-- 1 user group Aug 9 00:00 .snapshot/nightly.5/myfile
- By using the '-u' command line argument you will see the files listed by last access time when the snapshot was created
- Replacing the '-u' with a '-r' (no quotes) will show the files in reverse order of timestamp, therefore the list would be ordered oldest to newest
Copy the version of the file you want to recover to the folder you are currently in using the command:
shell> cp -p .snapshot/hourly.0/myfile .
Note by using this command if the file already exists in this directory it will be overwritten by this command, you can use the '-i' argument to the 'cp' command to prompt you any time a file would be overwritten. The '-p' command argument will preserve the date and modification time as well as any Access Control Lists (ACLs) or extended attributes, if applicable.
- The number and frequency of snapshots in the different file system partitions will not always be the same, and they can vary due to system constraints
- As the .snapshot directory is hidden you cannot use shell command auto-completion
- Not all file systems will have snapshots available
- There is only a limited period on which snapshot recovery will keep previous versions of the files, files required from older than this period will need to be recovered from tape
If you are having difficulty using the Previous Versions feature, please log a request for help from your IT Supporter in the first instance.
If you know you need to recover a file older than 14 days, please use the file recovery section of the online help form.
Please give full details of
- the name of the file and its full path including drive letter eg H:\dos\cv.doc or X:\Sports\Shared\judo.doc
- the date you last updated it if known
- the date and approximate time you deleted it or overwrote it if known
- Any other details that may be relevant.
We will try to retrieve the file within one working day. We back up files held on central file servers regularly. We normally guarantee to recover accidentally deleted or modified files to the state that they were in at the close of the previous day. We back up the files overnight, so they must be at least one day old to have a chance of being on the backup tapes.