Cold Backup
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: Cold Backup

  1. #1
    Join Date
    Jun 2001
    Posts
    88
    Hi gurus
    Could anyone give me the script for cold Backup.

    I have solaris8 and Oracle8.0.5

    I am very new to Solaris please guide me.

    Thanks
    Akash

  2. #2
    Join Date
    Feb 2001
    Location
    Paris, France
    Posts
    809
    quite simple, since you just have to save your files.
    1) know where are your files (datafiles, control files, init files, redo logs)
    2) know which device you'll use to save (DAT, DLT, HD ...)
    3) simply build a script to shutdown database, and copy the files using cp, cpio, or any other command
    4) startup database

    if you need details on how to do this, I think I have exemples for you somewhere, but not at work, I could bring you that tomorrow (about 9 AM GMT)

  3. #3
    Join Date
    Jun 2001
    Posts
    88
    Yep, please give the examples also.

    Thanks
    Akash

  4. #4

    plus..

    Although not strictly neccessary its also a good idea to get a copy of the init.ora, password files and to backup your controlfile to trace before shutting down. I think there should be some example scripts in the scripts-section on this site :-), if not then take a look on technet

  5. #5
    Join Date
    Feb 2001
    Location
    Paris, France
    Posts
    809
    get a file (filelst for example) with all the files you need to save :
    control files
    init file
    datafiles
    redo logs
    any other file you need
    then here is a skeleton of script to save your files (note : you can add log functionnalities, etc ...) :

    ------
    # configure to match your device if DAT or DLT
    BKUPDEVICE=/dev/rmt/0mn

    cat filelst | while read FILENAME
    do
    LISTSVG="$LISTSVG $FILENAME"
    done

    find $LISTSVG | cpio -oxcvB > $BKUPDEVICE
    ------


  6. #6
    Join Date
    Apr 2001
    Posts
    42
    I would suggest that you use a query to build a your cold backup script to get the paths to all your datafiles, control files, and redologs. This would eliminate the need for to know where you files resides because their locations would be gotten from the database. Also if you hardcode your paths every time you add a data file or redologs or move files around you would have to modify your backup script. The oracle scripts section of the site offers some excellent examples. Here the link to the scripts section: http://www.dbasupport.com/oracle/scripts/.
    If you would like a copy of the script that I use on my Solaris system send me an email at Ulysses.Hill@Gunter.af.mil.

    Utep

  7. #7
    Join Date
    Feb 2001
    Location
    Paris, France
    Posts
    809
    of course, nothing is hard coded

Posting Permissions

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


Click Here to Expand Forum to Full Width