AFS Backups
You've been working all week on a paper or a project and finished it up last night around 11 p.m. After going through classes you decide to put a few finishing touches on it and try to open it up. However, somehow you manage to delete the file and all associated work. Ahhhhhhhhhhhhhh! It's all gone in an instant! Like that! What to do? Don't panic yet.
At the time of this writing, the user system files are backed up every night around midnight which means that all your important data was backed up last night after you finished. Read on to learn how to use the 'backup' plan.
The very first thing that you need to do is find out where your backups are located. This is quite easy. If you type in the following command it will tell you.
fs lq
You should get something that looks like this:
Volume Name Quota Used % Used Partition
users.jschmoe 20000 6967 35% 57%
The numbers will vary and the username should be your own. The real important thing that we are looking at here is the part that has users.jschmoe (which will differ for yours). We will use this for the next command.
The next thing we need to do is actually gain access to our backups. It is a good idea to be in your home directory for this part, though it is possible to be in one of your subdirectories. Using the information we got from the previous command we enter:
fs mkm BACKUP users.jschmoe.backup
Let's br /eak this command down. The first part is fs mkm which asks the system to 'make mount point' (or make accessible). The backup specifies what name you would like to access it under (much like a directory name). This can be almost anything you wish, but to keep track of it, it is a good idea to use 'backup' or something similar. The next piece of the puzzle is users.jschmoe. This should look somewhat familiar, as it uses the information we had gotten previously. However, there is one important change. We have added .backup to the end of it. It is very important that you do this. Once you have entered that command you should be able to access the backup.
If you take a look in the current directory you should see a directory with the name you specified. If you enter that directory you should see a mirror image of what your home directory looked like around midnight the previous evening. You can enter directories and copy files out of this space. You are not able to write to the backup space as it is read only. But it's a backup, you don't need to!
Once you are done with the backup you've made, it is necessary to 'unmount' (give up your magic hold on) the backup. Go to the directory that you originally made the backup in. Refresh yourself as to what you named the backup (another good reason to name it backup) and then enter the following:
fs rmm BACKUP
It is important that you do not use the TAB key to finish the name of the directory, as it will add a trailing slash to the name. The command will give you errors if there is one there. If you've done everything correctly you should no longer see the backup and should not be able to access it anymore.
Important Things to Remember
Remember that the backups are created around midnight every evening which means that if you mess up you have until midnight to access the backup. If you wait until after midnight a new backup will be created of what is in your account at that time. It doesn't care if you made a mistake so you have to fix it before it churns the bits into mush.
So remember, if you make a mistake, don't panic just yet. If its not in the backup and you didn't have a copy of it anywhere else, you can then panic or contact your local system operator for assistance.




