RE: ONLINE CONSISTENT HOT BACKUP - HOW

RE: ONLINE CONSISTENT HOT BACKUP - HOW

 

  


A database hot backup is always consistent when you have the range of
archives that was created from the begin of the backup up till the end
of the hotbackup;
what you generally create/must have in order to have a consistent backup
is the following :
1. a backup of all datafiles present in a "select name , status
from v$datafile;"
2. the output of "alter database backup controlfile to trace;"
3. an archived log BEFORE the start of the backup
4. an archived log AFTER the backup has ended
5. all archived logs produced during the backup
6. copy of password file and init.ora

There is NO need to create a copy of the online redo logs.
There is NO need to backup the TEMP tablespace provided this is a true
temporary tablespace ("select contents from dba_tablespaces;" must give
TEMPORARY as result, else you have a TEMP tablespace in which you can
create objects, and that is not the intention); if you have a TEMP
tablespace with contents=PERMANENT and there are objects created in that
tablespace, then you must include the datafiles of that tablespace as
well in the backup

True temporary tablespaces exist since Oracle8

Hans




-----Original Message-----
From: Newbie-Slingshot
[mailto:oracledba-ezmlmshield-x78655547.[Email address protected]
Sent: vrijdag 6 oktober 2006 6:18
To: LazyDBA Discussion
Subject: ONLINE CONSISTENT HOT BACKUP - HOW


Hi all,

I have a 200GB+ database that I clone from time to time. Sometimes the
clone works and sometimes it doesn't and I have to apply archived logs
after logs and after logs until I have to give up. In most cases, this
happens because a batch job runs before the copy finishes. Does anyone
have a tried and tested way of making sure that a hot backup online copy

will always be consistent or at most maybe apply 5-10 archived logs and
then it becomes consistent? Any tips and tricks or scripts that anyone
from this FORUM uses will be very much appreciated.

FYI, this is how I do my hot backup:

1. Run ALTER DATABASE BACKUP CONTROLFILE TO TRACE
2. Create a list of tablespaces and append BEGIN BACKUP to the spool
file and run this file to place the tablespaces in backup mode.
3. Copy the datafiles using UNIX cp command. In some case, use scp to
copy to a remote directory
4. Copy the INIT file and the ORA password file
5. Create a list of tablespaces and append END BACKUP to the spool
file and run this file to take the tablespaces off backup mode.
6. Generate a list of archived logs that was generated during the
BEGIN and END backup and copy these archived logs as well.
7. Copy the REDOLOG files as sometimes the some log/s that needs to
be applied is/are in the REDOLOG.
8. On the TARGET server, modify the INIT.ORA file accordingly and
re-create the control files and startup the database. You may need
to apply archivelogs so that all datafiles will be consistent


Are my steps correct as above. I am including the TEMP tablespaces
during the copy as well as in some cases, this seems necessary and also
because it appears on the list of tablespace when I step 2.

Any advice or feedback will be very much appreciated. Thanks ...




---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY To post a
dba job: http://jobs.lazydba.com To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
-----------------------------------------------------------------
ATTENTION:
The information in this electronic mail message is private and
confidential, and only intended for the addressee. Should you
receive this message by mistake, you are hereby notified that
any disclosure, reproduction, distribution or use of this
message is strictly prohibited. Please inform the sender by
reply transmission and delete the message without copying or
opening it.

Messages and attachments are scanned for all viruses known.
If this message contains password-protected attachments, the
files have NOT been scanned for viruses by the ING mail domain.
Always scan attachments before opening them.
-----------------------------------------------------------------


Oracle LazyDBA home page