Hot Backup Script
atul, July 17, 2002 - 10:42 pm UTC
Hello sir,
I have written a script for daily hot backup..
Could you kindly help me in that
Script goes like this..
-----------------------------------------------------------------------------------------------
for i in `cat /tmp/sc1.lis`
do
echo "set heading off;\nset pages 0;\nALTER TABLESPACE '$i' BEGIN BACKUP ;\nexit"|sqlplus -s /
echo "set heading off;\nset pages 0;\nselect file_name from dba_data_files where tablespace_name ='$i' ;\nexit"|sqlplus -s / > /tmp/
w32.lis
for l in `cat /tmp/w32.lis`
do
cp $l /backup/.
done
echo "set heading off;\nset pages 0;\nALTER TABLESPACE '$i' END BACKUP ;\nexit"|sqlplus -s /
done
---------------------------------------------------------------------------------------------------------------
Where
vi /tmp/sc1.lis (Name of the tablespaces to be backed up)
TABLESPACE1
TABLESPACE2
TABLESPACE3
Actually we don't have development server so i can't test it..
so plz tell me will this script work??
or what changes should i do in it..
Thanks.
atul
July 18, 2002 - 8:25 am UTC
No, not really (not in the job of writing shell scripts)
Well, maybe I can help you out. You would be better served using RMAN. No OS dependent scripts -- it can be as easy as "backup database" basically. Suggest you look at RMAN.
incremental backups using rman
Duncan, December 08, 2003 - 11:48 am UTC
I would like to take incremental backups either cumulative or non. We have HP ultrium tapes but no license to use legato (or any other type of mms) so i am thinking about using rman to backup to disk and then archive using o/s commands.
My questions are:
1) How does rman decide on how to restore the database (possibly)using the incremental strategy? I mean in some cases it may be quicker (or more efficient) to do a restore from eg a level 2 and then roll forward using archive logs. In other cases it may be that it needs a level 0 and 3 level 2 backupsets before using the archive logs. So does RMAN actually make all of these decisions for you?
IF so then do i just need to decide on the best backup strategy for us eg
sun level 0
mon-fri level 2
sun level 1
mon-fri level 2
...
... etc
Then will rman decide on how to use these backupsets to achieve the desired restore?
2) If rman IS that clever and if i am manually archiving the backupsets to tape then how do i know which bacupsets RMAN is going to need to do a restore? Do i have to get all the available backupsets off of the tape and restore to disk before RMAN can decide and use the most efficient strategy??
December 09, 2003 - 5:30 am UTC
1) rman is not really going to analyze "it would be less work to restore the level 0 and then roll forward then to restore the level 0 and apply the N level and then roll forward". it'll restore the full, apply the needed incremental and roll forward pretty much.
2) you would need to restore anything it would want to use -- it assumes "all is where I put it last". You might consider getting some inexpensive ATA drives (you can get something like a terabyte for pretty little money) and keeing everything on magnetic storage and backing it up to tape using conventional means (file system dumps).
Thanks
A reader, December 09, 2003 - 6:48 am UTC
RMAN catalog Vs No Catalog
M. Senthil Kumar, December 09, 2003 - 10:25 am UTC
Hi Tom
Export can be used in addition to HOT backups or backups using RMAN. The export <<dmp>> can be used for retreival of data for a particular record. (If the user has accidently deleted the data , the dmp file will be useful in retrivel of the records). But this is not a solution for a large database where export takes a lot of time and disk space. In this case the logminer can be used for the retrival of the the record. Still it depends on how many records were deleted.
I do prefer RMAN and find it is much faster for back-up and retrivel. It depneds on the individual environment to choose catalog or no catalog option.
Incremental Data Export and Import - 8.1.7
Nazmul Hoque, November 28, 2007 - 2:22 am UTC
Dear Tom,
My Full Database installed in two localtion in diffrent server n same OS, Out of 210 table 100 are updateing only in one location and other 110 table are updateing in other location. I need to update table of both the location Daily basis by add the incemental data from the other part where it is updated.
Please advise me how i can export daily Incremental data of the selected table and also can import the same in other location. I am useing database 8.1.7 Enterprise Edition.
Thanks
November 28, 2007 - 10:49 pm UTC
you do not use export.
you might use materialized views.
read about them - goto otn.oracle.com and plug that into the documentation search.