Hi.
In my own case, I have a 350GB that I clone every month. Yeah yeah yeah, it takes time but most of the times, it works. The procedure you listed below is some how the same but will like to add or subtract one or two things.
- First I do mount the remote server onto the local server by NFS.
- Backup controlfile to trace
- Spool a list of data files to be copied.
- Spool a list of tablespaces to be put in backup mode! Then put all of them in backup mode.
- Spool also a list of redo logs too.
- Then copy all the data files and redo log files from the local machine to the remote machine. But since the remote machine is mounted using NFS, its just like a normal copy. i.e cp /u01/oradata/* /remote/oradata/*
- Then after all the files have been copied, I put the tablespaces of the local out of backup mode.
- Modify the controlfile from above changing the datafile, logfile, controlfile location to reflect that of the remote server.
- Mount the archive filesystem of the local machine onto the remote server (For recovery).
- Start up the db in the remote and recreate the controlfiles.
-Then issue recover automatic database using controlfile backup!. Since the archive log directory in the init.ora file points to that of the local machine (mounted via NFS), then monitor the alert log and see how the recovery process goes.
-The time to recover the db is usuall the time you put the tbs of the local machine from backup to normal mode. If you start copying the files at 8am and finished at 10pm, then you will need all the archive logs generated between that time!.
well this is pretty much how I do clone my prduction db onto the test server on a monthly basis.
Hope it helps!
DID
-----Original Message-----
From: Newbie-Slingshot [mailto:oracledba-ezmlmshield-x78655547.[Email address protected]
Sent: Fri 10/6/2006 5:17 AM
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
NOTE: This e-mail message is subject to the MTN Cameroon disclaimer, see http://www.mtncameroon.net/disclaimer.html
Oracle LazyDBA home page