SLAC ESD Software Engineering Group

 

UNIX DEVELOPMENT ENVIRONMENT

 

 

How to Restore from AFS Backup 

SLAC Detailed

SLAC Computing

Software Home

Software Detailed

Documentation and Web Support


         

         This document describes how to restore files from the backup for SCS AFS space.  The procedure for restoring files from

          limited supported NFS backup is covered in http://www.slac.stanford.edu/grp/cd/soft/slaconly/unix/nfsbackup.html, and a

          procedure for the controls UNIX backup via our DLT tape drives will be described in a separate page.

 

In contract to SCS NFS space, SCS  provides full backup support for AFS space where user's home directories, group and package areas are located. 

 

Backup/Restore for a user's home directory

Restoring from the backup for a user's home directory is very straight forward.  The backup for /afs/slac/u/cd/username

is in /afs/slac/backup/u/cd/username, always online and available for restoring.  Using cp to restore files from /afs/slac/backup/u/cd/username is all needed. For example, 

    • the home directory for user jingchen is in

           /afs/slac/u/cd/jingchen

    • the backup is in
    /afs/slac/backup/u/cd/jingchen
    •  to restore

    cp /afs/slac/backup/u/cd/jingchen/filename somewhere

 

Backup/Restore for a group directory or a package area

For a group directory or a package area in AFS,  one has to make the backup volume available on line via fs command and then restore. Here is the example for group nlcdev /afs/slac/g/nlcdev:

    • Find the volume name for /afs/slac/g/nlcdev
      $ fs listquota /afs/slac/g/nlcdev
      Volume Name Quota Used %Used Partition
      g.nlcdev 100000 21690 22% 56%
              The volume name is in the first column, which is g.nlcdev.
    • Make a mounting point

$ cd $HOME

$ fs mkmount afsbackup g.nlcdev.backup

afsbckup is the name of mounting point.

    • Verify if the backup volume is online

$ fs lsmount afsbackup
'afsbackup' is a mount point for volume '#g.nlcdev.backup'
$ ls afsbackup/
ctrl/ ioc@ pack/ tarf/ vib/

    • Restore files

              Again, all needed is to use cp to restore files from afsbackup.

              $ cp afsbackup/filename somewhere

    • Remove the mount point
              Always remember to delete the mounting point after you are done with restoring.
              $ fs rmmount afsbackup

Restoring for a package area in AFS works the same way as for a group directory.

 

        


Created: Jingchen

Modified: 06-Nov-2009