[OpenAFS] backup to file

amar deep kumar amar deep kumar" <kumaramar_sonu@rediffmail.com
3 Feb 2003 11:44:10 -0000


hi

    i am trying to configure AFS BaCKUP sYstem to take backup on 
file.
for file name i am creating a link /dev/FILE which points to the
actual data file , i have included MOUNT instruction in data 
file
configuration file (CFG_FILE) , so when i dump the volume set 
then
ideally according to the MOUNT script first of all the /dev/FILE 
link
should be removed and then it should create backup data file of 
name
${tapename}_${tapeid} but it is not removing the previous link and 
is
taking backup on the file linked through the previous link and 
then
creating new links for further dumping.

the script is
#! /bin/csh -f
    set devicefile = $1
    set operation = $2
    set tries = $3
    set tapename = $4
    set tapeid = $5
    set exit_continue = 0
    set exit_abort = 1
    set exit_interactive = 2
    #--------------------------------------------
    if (${tries} > 1) then
       echo "Too many tries"
       exit ${exit_interactive}
    endif
    if (${operation} == "labeltape") then
       echo "Won't label a tape/file"
       exit ${exit_abort}
    endif
    if ((${operation} == "dump")   |\
        (${operation} == "appenddump")   |\
        (${operation} == "restore")   |\
        (${operation} == "savedb")    |\
        (${operation} == "restoredb")) then

       /bin/rm -f ${devicefile}
       /bin/ln -s /hsm/${tapename}_${tapeid} ${devicefile}
#      if (${status} != 0) exit ${exit_abort}
    endif

    exit ${exit_continue}

i have removed "status" line because it was giving error as that
variable is not defined,is that creating the problem.