The HECToR Service is now closed and has been superceded by ARCHER.

The HECToR Archiver is now Read Only. Please use the UK Research Data Facility (UK-RDF) for long term data storage. Instructions are provided below to help you list and retrieve data from the Archiver.

This section describes how to restore archived data to the HECToR "work" filesystem using the cresrestore command.

Restoring Data from Archive

To restore data from the archive to the the HECToR "work" filesystem you use the cresrestore command.

Note: you can only restore data from the archive to the "work" filesystem on HECToR. If you want the data elsewhere then you must first restore it and then move it to its intended location.

cresrestore Command Usage

The cresrestore command takes the following form:

cresrestore [-v] [-s mm/dd/yyyy [HH:MM:SS]] [-e mm/dd/yyyy [HH:MM:SS]] \
            [-u user] [-k "keyword"] [-n oldpath=newpath] [-f]  file|directory

with options:

-v
Verbose progress of job, including listing of skipped filensmaes.
-s,-e
Only restore archives made between these dates.
-k
Only restore archives with this keyword.
-n
Alternate path to restore to (must be absolute path on HECToR "work" filesystem).
-f
Force overwrite of any data already at restore location.
-u user
Restore archives owned by user. The path you are restoring to must be writable by the user who owns the original archive.

Note: if the restore criteria map to multiple files of the same name, then the latest archived file will be restored. If an older file is required, the user should specify the archive date using the -s or/and -e options.

Note: if the restore is going to overwrite any existing files, the tool will prompt if the user is sure they wish to do this. This will be asked once and apply to the entire restore job.

Note: when files are restored, they are restored to the original location (the path from which they were archived), unless the -n option is specified. If they are restored from the nightly archive run then they will be restored back to ARCH or ARCH2. This means that they will be archived again during the next nightly run unless they are moved to a different location.

Examples

Restoring directories

Simply give the path of the archive directory that you wish to restore. For example:

user@nid00012:/work/x01/x01/user> cresrestore /work/x01/x01/user/my_results

Restore from backup performed on "10/21/2009 14:34:08" successful
Restore from backup performed on "10/21/2009 14:34:10" successful

Restore data based on keywords

You can restore all data associated with a particular keyword with the -k option. This keyword can include wildcard characters. For example:

user@nid00012:/work/x01/x01/user> cresrestore -k "first production run"

Restore from backup performed on "10/21/2009 14:38:43" successful

Restore data and force overwrite if file already exists

The -f option forces an overwrite of existing data if it already exists in the restore location. For example:

user@nid00012:/work/x01/x01/user> cresrestore -f /work/x01/x01/user/folder/4

Restore from backup performed on "10/21/2009 14:34:10" successful

Restore data to an alternate location

The -n oldpath=newpath option allows you to restore archived data to a different location to the one it was archived from. For example:

user@nid00012:/work/x01/x01/user> cresrestore -n \ 
    /work/y01/y01/archie=/work/y01/y01/archie/recovered /work/y01/y01/archie/folder/4
    
Restore from backup performed on "10/21/2009 14:34:10" successful

Note: the data must still be restored to a location on the "work" filesystem.

Restore data based on archive date

The -s and -e options allow data that was archived within a specific date range to be selectively restored. If multiple archives match the criteria then the latest archive will be restored. For example:

user@nid00012:/work/x01/x01/user> cresrestore -s 10/21/2009 14:38 -e 10/22/2009 17:38 /

Restore from backup performed on "10/21/2009 14:39:08" successful
Restore from backup performed on "10/22/2009 05:34:10" successful

Restore Another User's Data

The folder that you are restorig the data to must be writable by the user who created the original archive.

user@nid00012:/work/x01/x01/user> cresrestore -u auser /work/x09/x09/auser/folder/urand

Restore from backup performed on "01/14/2011 11:40:01" successful

cresrestore Error Messages

If you supply a path that does not correspond to any archived data you will see:

user@nid00012:/work/x01/x01/user> cresrestore folder

Path must be absolute

If you get the format of the -n option incorrect you will see:

user@nid00012:/work/x01/x01/user> cresrestore -n /tmp /work/x01/x01/user/folder/4

Format of alternate path is "oldpath=newpath"

If you attempt to overwrite an existing file with data restored from an archive without specifying the -f option you will see:

user@nid00012:/work/x01/x01/user> cresrestore /work/x01/x01/user/folder/4

Restore from backup performed on 10/21/2009 14:34:10 did not restore 1 file because restore
 attempted to overwrite file.
Restore failed - Backup Server failed to restore files.

If you try to restore files from a user who has not granted you access to their archives:

user@nid00012:/work/x01/x01/user> cresrestore -u auser  /work/y09/y09/auser/folder/oops

Sorry, you are not allowed to restore that user's archives.
Restore failed - Permission denied.

If the user you specify does not exist:

user@nid00012:/work/x01/x01/user> cresrestore  -u buser /work/y09/y09/auser/folder/oops

User "buser" not found

If you try to restore an archive that is in the process of being restored:

user@nid00012:/work/x01/x01/user> cresrestore /work/x01/x01/user/folder/4/proj49

This job is a subset of a job already running
Restore Failed - Job already running