Tim Whibley, Rainer Tobbicke IT/DCI
Attention! This article is OLD and probably OBSOLETE.
This article describes the scheme for backing up and restoring AFS files. It includes several examples on recovering files which have been lost and explains the procedures we have adopted as well as some of the internal details for those interested.
Currently backups are provided by the native AFS backup system. Data in AFS is backed up on a volume basis and typically each user's home directory is a single volume.
To find the name of the AFS volume housing your AFS home directory, from your AFS account try the command `fs lsmount $HOME', e.g.:
fs lsmount $HOME '/afs/cern.ch/user/t/tim' is a mount point for volume '#user.tim'
Every night, an AFS backup clone is created for each user volume. To find out when this clone is created, try the command `vos exam user.username.backup', e.g.:
vos exam user.tim.backup user.tim.backup 536899468 BK 8509 K On-line afs2.cern.ch /vicepad RWrite 536899466 ROnly 0 Backup 536899468 MaxQuota 50000 K Creation Tue Feb 18 22:32:45 1997 Last Update Tue Feb 18 22:32:45 1997 551 accesses in the past day (i.e., vnode references) RWrite: 536899466 Backup: 536899468 number of sites -> 1 server afs2.cern.ch partition /vicepad RW Site
This is a snapshot of an AFS volume and it is recreated every night.
This snapshot is mounted on /afs/cern.ch/ubackup/initial/username
The two following pairs of "Question & Answer" explain what you can do when you lose some AFS files:
Question I have just deleted an AFS file today. How can I get this file back ?
Look in /afs/cern.ch/ubackup/initial/userid
e.g.: ls /afs/cern.ch/ubackup/t/tim
Since the files in /ubackup are on disk, you can use
the command `cp' to copy these
files. However, the files in ubackup are recreated every night,
so see the next question for recovering
files not found
in ubackup. The same access
rights for AFS home directories apply to directories in
N.B.The CERN AFS User's Guide version 1.2 explains file permissions in detail.
1) Using the directory or file name which has been lost, issue the
`fs examine' command
(fs examine <dir/file path>) and note the volume name:
fs exam /afs/cern.ch/project/parc/p3_all/alpha_osf32 Volume status for vid = 536916469 named p.parc.patran Current disk quota is 900000 Current blocks used are 789078 The partition has 4219332 blocks available out of 12533760
2) `cd' to your home directory and mount the backup volume using a temporary non-existing name:
cd fs mkmount temp <volume-name>.backupE.g.: `fs mkmount temp p.parc.patran.backup'
3) look for your files below the temp subdirectory and copy them somewhere safe.
4) remove the unnecessary mount point:
cd fs rmmount temp
Question I lost some AFS files some days (weeks/months) ago. How can I get them back ?
If the file is less than one year old, mail
N.B. We need to know:
See next section (AFS Tape Restores) for more details.
AFS Tape Restores
Unfortunately, tape restores cannot be be performed by users
so you will have to send a mail to
with the following information:
p.project.R - for project volumes
user.username.R - for user volumes
A mail will then be sent to you explaining the procedure to mount this volume and copy your files to a safe place. You should then reply to this mail when you have recovered your files in order that we can remove this .R volume.
Please note the following concerning the AFS tape backups: