Snapshot Guide for Linux

How to Recover a File Using Snapshots/Previous Versions on the BEAR Research Data Store - Linux (via ssh)

To enable you to recover files from the Research Data Store, this guide explains how you can use the snapshot/previous version feature on Linux (Windows guide available here) to recover data yourself, without needing IT Services to recover data from backup tapes. Snapshots of files are usually available for 4 days e.g. if you made changes on a Friday, you could still recover the original file on the Monday after. Filenames of the snapshots will be named by the date they were created.

System Requirements

  • ssh client to connect to BlueBEAR e.g. PuTTY
  • University VPN service if working off-campus.

In the example below we are trying to restore files from the Research Data Store (/rds/projects/2017/ghumraak-01).

  1. Once you’ve logged into BlueBEAR, you can go to /rds/projects/2017/ by typing in
    cd /rds/projects/2017/.snapshots
    The folder .snapshots will hold several days’ worth of files.
  2. Type in 'ls' to see a list of the snapshots available:

    restore-06

3. Navigate to the date of the folder which you think contains the data to be recovered. For this example, the folder chosen is /rds/projects/2017/.snapshots/@GMT-2021.05.14-02.00.54/ghumraak-01/Folder A

cd '/rds/projects/2017/.snapshots/@GMT-2021.05.14-02.00.54/ghumraak-01/Folder A'

restore-074. Copy the files that are required to either the (a) original folder or (b) new folder.

WARNING : The file or folder will replace the current version on your computer, and the replacement cannot be undone. If you need to keep a copy of the original folder then you must rename the original folder before continuing to restore the files/folders. 

(a) To copy a specific file to the original location:

 cp 'Pop up screenshot.PNG' '/rds/projects/2017/ghumraak-01/Folder A'

 (b) Once you have created a new folder e.g. 'Folder A Recovered', you can copy the whole folder:

 cp -r '/rds/projects/2017/.snapshots/@GMT-2021.05.14-02.00.54/ghumraak-01/Folder A' '/rds/projects/2017/ghumraak-01/Folder A Recovered'

 You can then review the files in the new folder: 

restore-08

NOTE: From 2018 all projects were named with the the usernames initial then username 
/rds/projects/<usernames initial>/<project name>
for example if your username was skywalker and your project was called father-issue then 
/rds/projects/s/skywalker-father-issue

Further Help

If you need further help, you can contact us here.

Colleges

Professional Services