Restoring using tkrestore
To restore your files, you will need to use the tkrestore
command, which looks like the following. You should open
this using VLab (don't try to open it in VSCode or over SSH).
This will open up the tkrestore interface, which is divided into three panels:
You will need to load the backups that CSE has saved for you. You can do this by clicking on your zID in the center panel. This will cause the text on the left to disappear, and a message will appear in the bottom left saying "Added N nodes". You must wait until all the nodes have been added before you will see any files. This may take a while if you have many files.
Once all the files have been loaded, you will see them listed in the left hand panel. Reading across each line, you will see:
- An ID for each file
- The size of the file (or "DIR" if it is a directory)
- The time the backup was created
- "f" for "full backup" and "i" for "incremental backup"
- The name of the file
There are two types of backups:
- Full Backups are completed once a month. They can sometimes be slow to get restored; and aren't always the most recent copy of a file.
- Incremental Backups are taken every night, and are kept so they can be quickly accessed. Only files that have been changed are backed up incrementally.
To restore a file, select it in the left hand side, then press "Add" in the center panel.
The file will appear in the list on the right hand panel. This list indicated the files you wish to restore.
Press the "Restore" button in the bottom right to restore your files. This may take a short while (and may take up to a day if the files are very old).
Important Note: If you are attempting to restore an "Incremental Backup" as shown in the image below, you will not be able to restore a directory:
If you attempt to restore an incrementally backed up directory you will get the following error message:
Instead, you should double click the folder. Then you will see every backup taken of that folder. After the most recent backup, each file will be listed, as shown below:
You can then select those individual files and press "Add" to select them for restoration.
Finally, when you press the "Restore" button, all your files
will be in the folder called ~/Restored_Backups
. They will
be arranged into folders that indicate when a backup was taken
(i.e. if it was a full backup taken on the 10th of December 2020
it will be f-20.12.10). Inside those folders you will find your
lost files.
COMP1511 Additional Instructions
If you're in COMP1511 and you've lost some files; there is an additional backup that may have more recent files.
Go to https://web.cse.unsw.edu.au/~cs1511/21T1/student/ and then select "Student History" next to the activity you need to restore.
Then, you will be able to see a list of all your previous submissions. If any of them are the correct file, use the "Copy" button to copy the file to your clipboard.
COMP2041 Additional Instructions
If you're in COMP2041 and you've lost some files; there is an additional backup that may have more recent files.
Go to https://web.cse.unsw.edu.au/~cs2041/21T1/student/ and then select "Last Autotest" next to the activity you need to restore.
Terminal Issues
If all your files have been wiped, make sure you
also run the 1511 setup
and 1511 colors
commands;
which will give you access to a better terminal interface
and nicer terminal.