Storage and Recovery

How to Access your Allocated Storage in EECE
Your home directory is on a safe storage unit with backup and snapshots. When you login on a ECE department Windows machine under the domain UBC_ECE, your home directory is mounted as the “Z:” drive. Please use this space to store the files you create. The local disk storage (e.g. C: or D: drives in Windows) may crash at any time and there are no backups available for them. However, your home directories are backed up and data recovery from snapshots are self-serviced (follow the instructions below).

For research groups and those with local login on their Windows PCs, you can “Map” to your home directory (Z: drive) as follows:
From File-Manager, click on “Computer” on the left side and choose the menu option: “Map Network drive” (you can choose the letter of your choice to assign to it). For Folder type in: \\\ <your-ECE-userID>   and select “Connect using different credentials”. Then click Finish.
When the sub window: “Enter Network Password” appears, type in: UBC_ECE\<your-ECE-userID>    and your ECE password. You can choose to save your password if this is your personal PC.

On Linux machines, your home directory is your default starting path when you login. The paths /var/tmp /tmp and /data etc. are on local disk and should only be used to store temporary data.


How to Recover Lost/Corrupted files

Note: the snapshots are only visible on linux machines. In any folder, you can list the snapshots using the command:
ssh-linux1:~> ls -lF .snapshot           # Sample outputs
sv_daily@00:00.2016-01-29_0000/ ….{8 days} sv_hourly_no00.2016-01-28_2200/ ….{25 hours}
sv_weekly@2:00.2016-01-17_0200/ sv_weekly@2:00.2016-01-24_0200/

Notice the “hourly”, “daily” and the 2 “weekly” folders. Each has a snapshot of your current folder for that hour, day, or week (up to 2 weeks). To list the content of your folder and the snapshot of your folder use the following command:
> ls -lF
total 4
-rw-r–r– 1 roozbeh tecstaff 19 Jan 29  12:58      a_new_file.txt
drwx—— 4 roozbeh tecstaff 4096 Mar 31 2010 proj1.ep/

>ls -lF .snapshot/sv_hourly_no00.2016-01-29_1200/
total 4
drwx—— 4 roozbeh tecstaff 4096 Mar 31 2010 proj1.ep/       # Notice that the new file is not in this hour’s snapshot, since it was created after 1200.

To recover the folder proj1.ep from yesterday’s snapshot, use the following command (notice the option -r to copy the folder and its sub-folders and files):
> cp -r .snapshot/sv_daily@00:00.2016-01-28_0000/proj1.ep .      # Note: this will copy proje1.ep to the current “.” directory.

If the folder exists, it will overwrite it and its content. It is advised to copy to a new folder (or rename the old one) to prevent loss of content of the existing folder.
> cp -r .snapshot/sv_daily@00:00.2016-01-28_0000/proj1.ep   ./recovered_proj1.ep


Checking for Storage Limits

You can use the following commands to check for your quota (note: some graduate students don’t have individual quota allocation)

Note that the total quota allocation for all users on a system, might be more than available storage (it is safe to assume most people don’t consume 100% of their allotted quota). So you can check for space availability using the df command:

Disk Usage df

If you come across this issue (/tmp or /var/tmp being full), please remove your temporary files from these folders (as much as you can) and email to report the hostname and the directory which is out of space.