Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2007

    Unanswered: sybase n aix 5.2 : backup to tape drive


    i'm newbie in sybase or aix..i'm trying to backup my database to tape drive.
    i use this script

    dbname=$1 # 1st parameter is the database name
    dumpdir=$2 # 2nd parameter is dump directory
    scriptname=${0##*/} # remove path from script name
    if [ "$2" = "" ]
    echo "Error: missing parameter"
    echo "Syntax: $scriptname <dbname> <backup_dir>"
    exit 8
    . /usr/sybase1253/ # sybase env (Note dot space slash)
    isql -Usa -P -SSYBASEKK <<EOF >"$logfile"
    dump database $dbname to "/dev/rmt1.1 capacity 2000000"
    if [ "$(grep 'DUMP is complete' $logfile )" = "" ]
    echo dump database "$dbname" failed see "$logfile"
    exit 12

    when i trying to restore the file that i backup,an error occurs.

    1st,i wanna view file from my backup to do it?
    2nd,how can i restore the database back to my database? i use this command

    load database zihan from 'dev/rmt1.1'

    but and error occurs.

    3nd,i backup 7 database into same if i reused the tape,do i must to erase the tape first?

    thanx in advance

  2. #2
    Join Date
    May 2005
    South Africa
    Provided Answers: 1
    What error message did you get?
    Was the backup successful?
    Did you rewind the tape?
    Maybe the backup tried to write to file "/dev/rmt1.1 capacity 2000000" i.e. a file name with spaces.

  3. #3
    Join Date
    Jun 2007
    hi again..sori late answer

    thanks pdreyer.

    i'm already successfull make a script to dump database.but now i'm having problem with my tape.

    i use hp 4mm 40gb dds4 tape.
    after i backup all my database, then i wanna reused the tape.maybe i'm silly..i try to erase the tape contain using aix command.

    #tctl -f /dev/rmt1.1 erase

    after the command successfull erase the tape..i found that the tape cannot be read anymore..why it's happen?

    i wanna make sure that is because of tape or something else..then i trying to erase another tape..and guess what? same error i get.cannot read the tape again.

    if i use command

    #tctl -f /dev/rmt1.1 read
    tctl : 0511-578 cannot read 512 bytes : there is an input output error

    so i trying to use 1024 byte

    #tctl -f /dev/rmt1.1 -b 1024 read
    tctl :0511-578 cannot read 1024 bytes:there is an input or output error question is..

    what is the tctl erase function? i read the manual,it said it only to erase the contain of tape.but now it make the tape cannot be read.

    or i'm doing something wrong?


  4. #4
    Join Date
    May 2005
    South Africa
    Provided Answers: 1
    Sorry can't help if AIX specific.
    You can try posting at
    But shouldn't you be writing to the empty (erased) tape first before you will be able to read it?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts