Cold backup script - failsafe envt
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Cold backup script - failsafe envt

  1. #1
    Join Date
    Oct 2001
    Location
    Hornchurch, Essex UK
    Posts
    132
    I've got a script to run a cold backup in a failsafe environment. Is there anything else I need to consider as I intend to run this script this evening.

    rem Move Group containing the database to node where
    rem backup will run


    REM Move the Group
    c:\oracle\ofs\fs\fsmgr\bin\fscmd movegroup "Evolve Oracle Live" /node=SVR115 /cluster=CLU103 /logfile=c:\oracle\fsverify.log

    REM Take the group offline
    c:\oracle\ofs\fs\fsmgr\bin\fscmd offlineresource evolvliv /cluster=CLU103 /user=Cluster /pwd=PassWord1 /domain=domain name /OFFLINE=IMMEDIATE


    copy /Y U:\ORACLE\ORADATA\evolvliv\SYSTEM01.DBF v:\backup\cold

    copy /Y U:\ORACLE\ORADATA\evolvliv\CL_RBS01.DBF v:\backup\cold

    copy /Y U:\ORACLE\ORADATA\evolvliv\CL_TMP01.DBF v:\backup\cold

    copy /Y U:\ORACLE\ORADATA\evolvliv\CL_DAT01.DBF v:\backup\cold

    copy /Y U:\ORACLE\ORADATA\evolvliv\CL_IND01.DBF v:\backup\cold

    copy /Y U:\ORACLE\ORADATA\evolvliv\CONTROL1.CTL v:\backup\cold

    copy /Y U:\ORACLE\ORADATA\CONTROL2.CTL v:\backup\cold

    copy /Y U:\ORACLE\CONTROL3.CTL v:\backup\cold

    copy /Y U:\ORACLE\ADMIN\evolvliv\PFILE\INITevolvliv.ORA v:\backup\cold


    pause

    REM Place the resource back online.

    c:\oracle\ofs\fs\fsmgr\bin\fscmd onlineresource evolvliv /cluster=CLU103 /user=Cluster /pwd=PassWord1 /domain= domain name

    exit


    There's a batch file that calls this script. I also need to schedule it using NT AT scheduler. Do I need to schedule this on both nodes. What about the way fscmd command runs scripts, will there be time to take the database offline before copying the other files?

    Any suggestions/comments will be welcome.

    Thanks

  2. #2
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    I'm not sure why at the begining of the script you move the resource group to another node (fscmd movegroup). Anyhow, if this is realy necessary then probably you should move the group back to the original node before you put the group back online at the end of the script.

    Or am I missing something?
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  3. #3
    Join Date
    Oct 2001
    Location
    Madrid, Spain
    Posts
    763
    As Jurij said, I don't understand this moving group at the begin of the script, because only one node have access to the shared disks, then if you execute this script in one node, it will probably fail.

    Just place offline the resource, copy the database file, controlfile ... and place the resource online, always in the node who has the control in this moment.

    Regards

    Angel

  4. #4
    Join Date
    Oct 2001
    Location
    Hornchurch, Essex UK
    Posts
    132
    Thanks. You're right. I've removed the 'move group'. Sorry I sent the old version. What about scheduling this to run once a week. Do I need to schedule it on both nodes?

  5. #5
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Originally posted by joyce_ank
    What about scheduling this to run once a week. Do I need to schedule it on both nodes?
    What about scheduling it once a week? Simply configure a batch script that calls your cold backup script and schedule it to run once a week using AT. However I don't see any point in taking regular *cold* backups once a week. In any production environment the database should be in archivelog mode, so there should be strictly hot-backup policy established. Cold backups simply don't have any "pros" compared to hot backups, they only have "cons". If you also take hot backups, there is simply no point in taking regular cold backups in addition.

    As to schedule it on both nodes: maybe it would be vise to do so. As you don't actualy know on which node the instance will run at the time of backup, you should try to back it up on both nodes. Of course only one node will succeed, the other one will simply bomb out with some error messages. However be cautious! Both nodes are able to take your database group offline, but this is not what you actually want to happen. You should put some code at the beginning of your batch file that determines on which node the databes actualy runs (for example by trying to access the disks on which database files reside). If those disks are not reachable from that node, your code should exit the batch script before it actually tries to take the group offline. That way only the backup script at the node that runs the database wil succeed, the script on the other node will simply end without actually taking database backup.
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

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