Re: Hot backups vs. Offline Backups

From: Neil Greene <ngreene_at_locws140049.shl.com>
Date: 1995/12/20
Message-ID: <ngreene.819424133_at_houws001.shl.com>#1/1


chuckh_at_ix.netcom.com (Chuck Hamilton) writes:

>What happens to your database integrity in the following scenario:
 

>1. you're in the middle of a hot backup of tablespace 'a'
>2. during that backup, a transaction occurs that effects objects in
>tablspaces 'a' *and* 'b'?
>3. you finsish the hot back up of 'a' and being a hot backup of
>tablespace 'b'.
 

>If you have to restore both tablespaces, will you still have database
>integrity?

Yes.

>I could be wrong and please correct me if I am, but wouldn't the
>backup of tablespace 'a' be missing parts of the transaction that the
>backup of tablespace 'b' contains? And if so, then don't you have to
>do an ALTER TABLESPACE x BEGIN/END BACKUP on all tablespaces that
>might be updated during the backup?

I think people in this group are getting ready to find out just how IMPORTANT those archived redologs are to the database.

	for each TABLEPSPACE in TABLESPACE_LIST; do
		alter tablespace $TABLESPACE begin backup

		# Now copy the datafile
		dd if=$TABLESPACE_DATAFILE of=$BACKUP_PATH/$TABLSPACE_DATAFILE
bs=$BLOCK_SIZE                 
		alter tablespace $TABLESPACE end backup
	done

Prefered method is to backup one tablespace at a time. For some systems I am actually running two tablespace backups in parallel. And of course, this all depends on when the hot backups are done and what/how things may be effected for performance reasons. I then backup N number of sids on one system in parallel as well.

Ok, what happens if something does wrong and you have to restore tablespace 'a'. Well, restoring tablespace 'a' is exactly the same as restoring tablespace 'b'. So, it really doesn't matter. In both cases, you recover the copy of the datafile and apply your archived redo logs to bring everything up to date. Doesn't matter if it is 'a', 'b', or 'a' & 'b'.

They key is to NOT lose your archivelogs. Hence, mirror these files. Preferably, put archive logs on a seperate filesystem on seperate disks and mirror them. If for any reason, you lose your archive logs you are either A) screwed, or B) do a cold backup of your system before you need the lost archivelogs. Keep archive logs until the last COLD backup. The restore of any datafile 'usually' implies some required archived redo logs, or at minimal the syncing of datafile timestamps.

-- 
Neil Greene
Senior Oracle DBA / Unix System Administrator
SHL Systemhouse, Inc.  	LA Outsourcing Center 	
<HREF=mailto:ngreene_at_shl.com>
-- 
Neil Greene
Senior Oracle DBA / Unix System Administrator
SHL Systemhouse, Inc.  	LA Outsourcing Center 	
<HREF=mailto:ngreene_at_shl.com>
Received on Wed Dec 20 1995 - 00:00:00 CET

Original text of this message