Here's basically what you need to do:

1)  Write a script which determines which files to backup (hit the DBA and
V$ tables)
2)  Shutdown the database
3)  Once you have those files, use them as a driver in a for|while loop (for
each file, 
    A)  Check if it's raw or UFS
        if [ raw ] then use dd to backup
        else use whatever you want (dd|cpio|tar)
        to backup to disk|tape
        write in the logfile what time you started this file copy
    B)  if success, write to log
        else try again and write to log
4)  Startup the database

This can, and should, all be in one script.  You can schedule this script to
kick off at midnight.

You can have another script, which you kick off to start at 5 which
1)  Checks to see whether the first script is running
2)  If it is, kill it and all its subprocesses
3)  Write to the first one's log file that it was killed at 5AM
4)  Start up the database

As for what the commands are to do all this, they are both easy and
time/space consuming to spell out, so I'll leave it to you.  It seems to me
that you are asking for a backup script.  There is a book from Oracle Press
on Oracle backups where you can type it in line by line from the book.

Have fun!
Bambi.
-----Original Message-----
Sent: Friday, February 15, 2002 11:25 AM
To: Multiple recipients of list ORACLE-L


HI LIST,

I AM LOOKING FOR A SCRIPT TO MAKE A COLD BACKUP FOR ORACLE 8.1.6 ON SunOS
5.7.
I want to schedule this script to shutdown the database at mid night and
make a backup then start it up at 5:00 AM.
Any URL or link or any document it will be very helpful.




Hamid Alavi
Office 818 737-0526
Cell    818 402-1987

The information contained in this message and any attachments is intended
only for the use of the individual or entity to which it is addressed, and
may contain information that is PRIVILEGED, CONFIDENTIAL and exempt from
disclosure under applicable law. If you have received this message in error,
you are prohibited from copying, distributing, or using the information.
Please contact the sender immediately by return e-mail and delete the
original message from your system.
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Hamid Alavi
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Kevin Lange
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Bellows, Bambi
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to