User:Rewood/Restoring Home Directory Backups

From WolfTech
< User:Rewood
Revision as of 10:20, 1 March 2006 by Rewood (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Problem: I accidently removed a file from my home directory, and I need it back. How can I get a backup copy restored?

Solution: All user volumes (home directories) are backed up on a regular basis. Part of the backup process is the generation of backup volumes, or online backup copies. In general, backup volumes are created every morning shortly after midnight, and they exist, unaltered, until the next time a backup volume is created. One result of this is that users may now restore their own accidentally deleted files from their backup volumes in most situations. Restoring deleted files from a backup volume can be done in most cases. These cases will meet the following criteria: The most recent backup volume was made at some point when the file in question existed. This means that if you delete a file that you just created, chances are, it hasn't made it to a backup yet. The user must recognize that he or she wants that file restored before the next backup volume is made (generally in the early morning hours.) If your situation meets these criteria, then you should be able to recover your files by yourself, or with the help of a consultant or operator. If you do not meet these criteria, or you are unsuccessful, your next step of action should be to contact a consultant or operator and request a restore from the tape backup. Please note the following when requesting a restore from tape: Restoring files from a backup tape is a labor intensive and time consuming process. For this reason, unfortunately, in most cases we can only perform up to two restores from tape to help retrieve your lost files. So please request your restore date(s) carefully. Backups on each day are made from a snapshot of your files as they existed on or around midnight of that day. Requesting a restore for 1/14/98 (a Wednesday), for example, will give you access to your files as they existed when you quit working on Tuesday. Restoring files from your AFS backup volume: Step One: Getting Started You will need to know some things before you get started. - The name of the file(s) you want restored - The location of the file(s) you want restored - The name of your volume You can determine this by using the command: fs examine ~ It will output something like: Volume status for vid = 537008297 named users.wufpak Current disk quota is 20000 Current blocks used are 10593 The partition has 214269 blocks available out of 1872775 We're interested in the last bit of the first line. The name of this volume is users.wufpak - Where (in which cell) your volume lives You can determine this by using the command: fs whichcell ~ It will output something like: File /ncsu/wufpak lives in cell 'unity.ncsu.edu' - A mountpoint directory This can be anything you want; to make life easier and less confusing, this should be a directory or file that does not already exist. Step Two: Go Home Use the cd command with no arguments to move to your home directory. cd Step Three: Mount Your Backup Volume First, you need to tell your computer where to access your backup volume. This is done by a process called mounting. The general form of the command to mount your backup volume is: fs mkmount -dir mountpoint directory -vol volume.backup -cell cell The full command for a real user might look like: fs mkmount -dir backup -vol users.wufpak.backup -cell unity.ncsu.edu or fs mkmount -dir backup -vol users.w.wolfpack.backup -cell eos.ncsu.edu Step Four: Retreive Your Files Now that you've mounted your backup volume, use the cd command to go to that directory. cd ~/mountpoint where mountpoint is the mountpoint directory from above. You are now in the "root" of your home directory as it was at the time the backup volume was made. Use the cd command to change to the directory in which the file you wish to restore was in. Then use the cp command to copy that file back to your real home directory: cp restore.html ~/ Repeat Step Four for each file you wish to restore If you have problems getting to your backup volume, with errors such as "Connection Timed Out" or "Volume not Available", this may be due to the fact that your volume was moved, and no online backup is available. In this case, you will have to request a backup restore from tape, which will take a little longer. For more information on tape restores, see: http://help.ncsu.edu/services/getsoln.pl?id=1886 Step Five: Go Back Home Use the cd command with no arguments to move to your home directory: cd Step Six: Unmount Your Backup Volume The command for unmounting a volume is very similar to the command to mount it: fs rmmount -dir mountpoint directory For our two ficticious users, it would look like: fs rmmount -dir backup You're done!