Wikier

Restoring files on network directories

Network directories are backed up regularly. This article details how to restore your files from this backup.

Norsk versjon - Gjenoppretting av filer på hjemmeområdet

Looking for something else? Topic page about IT-support | Pages tagged Backup

You can do this from your own computer if you have connected to your network directories, or in a computer lab with Windows 7 installed. To restore files older than 10 weeks, please contact your local IT support.

Windows 7/10

Restore previous versions of files

  • Use Windows Explorer to move to your network directory.
  • Locate the file you want to restore
  • Right-click the file, select Restore previous versions.
  • The dialog box should now show previous versions of the file or folder.
    Try the folder above the file if the file itself has no previous versions. If the list is empty, the file has not changed in 10 weeks.
  • Select the version of the file that you want, then click Restore.

The file should now be rolled back to the desired version.

Restoring a deleted file

  • Use Windows Explorer to move to your network directory.
  • Locate the folder where the file was before deletion.
  • Right-click the folder, select Restore previous versions.
  • The dialog box should now show previous version of the folder.
  • Select the version you want of the folder, then click Open.
  • Explorer will now show the content of the file at the specified date, and you can copy the file that was deleted.

Using command line

Files can also be restored using a command line interface. This requires that you are comfortable entering textual commands. NOTE: as an employee, use username@login.ansatt.ntnu.no and as a student, username@login.stud.ntnu.no

  • Connect to login.stud/ansatt.ntnu.no using ssh: ssh username@login.stud/ansatt.ntnu.no
  • Use cd to navigate to the directory where the file is in or was before deletion:cd path/to/folder
  • Enter the hidden snapshot directory:cd .snapshot
  • Run ls to show available snapshots:caracal:/dokument/folder/.snapshot$ ls

hourly snapshots are taken at 08:00, 12:00, 16:00 and 20:00. Thus, hourly.0 is the closest of those timestamps, hourly.1 is the next and so on. nightly.0 is the snapshot taken at the preceding midnight, nightly.1 is 24 hours ago, and nightly.n is n days ago. The same applies to weekly.

Copy a file from the desired snapshot

Restoring the file document.txt, deleted or changed two days ago:

cp nightly.2/document.txt ..

will restore the file to the directory above the one in which you are currently located.

To restore an entire directory, run the same command, only enter the .snapshot directory one level above the directory level. You also need to add the option -r to cp:

cp -r weekly.2/directory ..

will restore a directory from two weeks ago.

Contact

Orakel Support Services can help if you encounter difficulties or if you have questions.