restore time [message #350293] |
Wed, 24 September 2008 10:55 |
varunvir
Messages: 389 Registered: November 2007
|
Senior Member |
|
|
Hi Experts,
My Backup strategy is:-
run {
allocate channel chan1 type disk format '/data2/orabackup/BHI_1/rman/0/%d%U
.rman0';
set limit channel chan1 kbytes=2000000;
backup incremental level 0 filesperset 1 database;
sql 'alter system switch logfile';
backup archivelog until time 'sysdate-3' delete input;
backup current controlfile tag = 'BHI_1-ctl'format = '/data2/orabackup/BHI_
1/rman/0/ctl_%d_%U';
restore database validate check logical;
crosscheck backup;
crosscheck archivelog all;
delete noprompt expired backup;
delete noprompt expired archivelog all;
release channel chan1;
}
we are removing all the backup files from OS older than one day by:-
find /data2/orabackup/BHI_1/rman/0 -name "*.rman0" -mtime +0 -exec rm {} \;
I wanted to know t what is maximum time in which I can restore
archivelog with this policy.
|
|
|
|
Re: restore time [message #350643 is a reply to message #350368] |
Thu, 25 September 2008 14:21 |
varunvir
Messages: 389 Registered: November 2007
|
Senior Member |
|
|
Hi Ebrian,
This is script is run by our backup dba.I am working
on streaming.So at any point of time if streaming stops it will
look for old archivelogs to restart again.So i need minimum
of 7 days of restore period.So you mean if somebody deletes
the backup of archivelogs from operating system,then we cannot
restore those with Rman .What changes I can make in this script to
make sure that i will be able to restore 7 days oldarchivelogsat any point of time.
Regards,
Varun Punj,
|
|
|
Re: restore time [message #350652 is a reply to message #350368] |
Thu, 25 September 2008 16:26 |
varunvir
Messages: 389 Registered: November 2007
|
Senior Member |
|
|
Hi Ebrian,
So the maximum restore time is 4days.I spoke to
Bacup DBA about the criticality of archive log restoration
If streaming is enabled.They are taking veritas netbackup
of the all the files also on operating
.So I just want to clear my doubt that
archivelog files restored from veritas backup will be good
to use by stream capture process.In other words restore
from RMAN and resotring manually form veritas backup give
same archivefiles??
|
|
|
|
Re: restore time [message #350696 is a reply to message #350293] |
Thu, 25 September 2008 23:02 |
ora110
Messages: 42 Registered: September 2007 Location: China
|
Member |
|
|
Quote: |
find /data2/orabackup/BHI_1/rman/0 -name "*.rman0" -mtime +0 -exec rm {} \;
|
why not
"-mtime +1"
|
|
|
Re: restore time [message #350700 is a reply to message #350664] |
Thu, 25 September 2008 23:33 |
varunvir
Messages: 389 Registered: November 2007
|
Senior Member |
|
|
Hi Ebrian
RMAN will be aware or streaming if it stores backup
in flashback recovery area.
But here we have manually defined the location of backup.
Please corrent me if I am wrong?
Regards,
Varun Punj,
|
|
|
|
Re: restore time [message #350822 is a reply to message #350700] |
Fri, 26 September 2008 09:34 |
varunvir
Messages: 389 Registered: November 2007
|
Senior Member |
|
|
RMAN is aware of streams.
But in this case archivelogs are getting deleted
manually by the script I shown you.So I dont think I can get
the required archivelogs in this case.Please correct me again
If I am wrong.I am going so deep into this because of
the criticality of streaming.
Regards,
Varun Punj
|
|
|
Re: restore time [message #350824 is a reply to message #350822] |
Fri, 26 September 2008 09:56 |
|
ebrian
Messages: 2794 Registered: April 2006
|
Senior Member |
|
|
I understand your concern. In my Streams environment, I set an appropriate retention policy and then perform a DELETE OBSOLETE and this will not remove archive logs required by Streams.
As I mentioned previously though, your script is configured to ONLY backup archivelogs that are over 3 days old. What are you planning to do if your system crashes and the last 3 days worth of archivelogs are not backed up and unrecoverable?
[Updated on: Fri, 26 September 2008 10:02] Report message to a moderator
|
|
|
Re: restore time [message #350837 is a reply to message #350824] |
Fri, 26 September 2008 12:12 |
varunvir
Messages: 389 Registered: November 2007
|
Senior Member |
|
|
Hi Ebrian,
My current backup policy is taking backup of 3 days
old archivelogs.But according to you it is taking backupup
of all the archivelogs older than 3 days.I might be wrong
in this scenerio.But i checked that i am able to restore
4 days old archivelogs by following command:-
restore archivelog from 'sysdate-4' validate;
The other concern is In your case RMAN is deleting obsolete
archivelogs so it will definitely take care of streams.But
policy set by my dba is deleting archivelogs manually from
O.S.So Rman should not take care of streaming in this case
of manual interference.I asked my dba that let RMAN take care
of archivelogs and he told me that we got space issues.So they
are taking backups of the files in the disk by VERITAS BACKUP.
Here again one question comes in my mind,restoration of archivelog from backup
taken by Veritas backup will be good enough for streaming
to restart.
Regards,
Varun Punj,
|
|
|
Re: restore time [message #350850 is a reply to message #350837] |
Fri, 26 September 2008 13:22 |
|
ebrian
Messages: 2794 Registered: April 2006
|
Senior Member |
|
|
Your script is taking backup of archivelogs OVER 3 days old. Therefore, archivelogs 3 days old and newer are not being backed up.
Can you post the output of:
restore archivelog from 'sysdate-2' validate;
Do you see any archivelogs listed ?
If you have no other choice but to delete files due to space constraints, then you should perform the following:
backup archivelog all not backed up 1 times;
delete noprompt archivelog all completed before 'sysdate-3' backed up 1 times to device type disk;
In answer to your question about restoring from tape, if needed, you can restore archivelogs from tape and register them with Streams.
[Updated on: Fri, 26 September 2008 13:24] Report message to a moderator
|
|
|
Re: restore time [message #350860 is a reply to message #350850] |
Fri, 26 September 2008 14:26 |
varunvir
Messages: 389 Registered: November 2007
|
Senior Member |
|
|
Hi Ebrian,
I am posting end lines of command:-
restore archivelog until time 'sysdate-2' validate
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40243 1_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40243 2_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40243 3_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40243 4_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40243 5_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40243 6_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40243 7_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40243 8_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40243 9_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40244 0_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40244 1_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40244 2_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40244 3_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40244 4_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40244 5_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40244 6_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40244 7_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40244 8_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40244 9_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40245 0_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40245 1_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40245 2_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40245 3_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40245 4_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40245 5_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40245 6_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40245 7_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40245 8_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40245 9_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40246 0_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40246 1_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40246 2_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40246 3_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40246 4_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40246 5_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40246 6_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40246 7_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40246 8_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40246 9_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40247 0_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40247 1_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40247 2_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40247 3_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40247 4_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40247 5_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40247 6_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40247 7_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40247 8_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40247 9_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40248 0_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40248 1_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40248 2_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40248 3_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40248 4_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40248 5_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40248 6_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40248 7_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40248 8_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40248 9_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40249 0_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40249 1_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40249 2_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40249 3_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40249 4_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40249 5_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40249 6_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40249 7_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40249 8_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40249 9_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40250 0_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40250 1_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40250 2_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40250 3_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40250 4_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40250 5_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40250 6_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40250 7_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40250 8_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40250 9_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40251 0_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40251 1_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40251 2_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40251 3_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40251 4_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40251 5_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40251 6_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40251 7_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40251 8_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40251 9_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40252 0_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40252 1_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40252 2_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40252 3_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40252 4_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40252 5_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40252 6_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40252 7_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40252 8_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40252 9_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40253 0_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40253 1_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40253 2_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40253 3_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40253 4_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40253 5_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40253 6_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40253 7_563391362.log
channel ORA_DISK_1: scanning archive log /data/admin/BHI_1/arch/archBHI_11_40253 8_563391362.log
Finished restore at 26-SEP-08
|
|
|
Re: restore time [message #350861 is a reply to message #350850] |
Fri, 26 September 2008 14:29 |
varunvir
Messages: 389 Registered: November 2007
|
Senior Member |
|
|
Yes I ann see archivelog listed with the help of:-
list archivelog all
This command is showing me archive logs from June till
25th september.
|
|
|
Re: restore time [message #350865 is a reply to message #350861] |
Fri, 26 September 2008 14:33 |
varunvir
Messages: 389 Registered: November 2007
|
Senior Member |
|
|
List archivelog all is showing archive logs till
26th september.Sorry to provide wrong info
If I restore archivelog from backup taken with veritas backup
do I need to do anything manually inorder to register them
for streaming Or i just need to place all the required archive
logs at archive destination and stream will start capturing
from required_checkpoint_scn automaically. Regards,
Varun Punj,
|
|
|
|
Re: restore time [message #351425 is a reply to message #350293] |
Tue, 30 September 2008 15:04 |
varunvir
Messages: 389 Registered: November 2007
|
Senior Member |
|
|
Hi Ebrian,
I told Backup dba to change the script as told by you
so that RMAN should take back up of archivelogs not
backed up once.We have to gzip all the archivelog files
at archive destination because of space issues.So due to
this backup of archivelog is failing.Now My DBA told me not to
take any backup of archivelogs with RMAN and to keep
all the 5 days old zipped archive files at archive destination.He told
me that they are backing up archive logs everyday with
veritas net backup so they can restore
archive logs any time.Please suggest me If I could go by his
suggestion in this environment where streaming is enabled Regards,
Varun Punj,
|
|
|
Re: restore time [message #358512 is a reply to message #350824] |
Tue, 11 November 2008 12:16 |
varunvir
Messages: 389 Registered: November 2007
|
Senior Member |
|
|
Hi Ebrian,
I have found one bug in oracle streams.As we discussed that RMAN
is stream aware and it wont delete archivelogs needed by
STREAMS.Please see this at metalink which is saying that RMAN will
delete archivelogs:-
Bug 3741999
Regards,
Varun Punj
|
|
|
|
Re: restore time [message #358569 is a reply to message #358556] |
Tue, 11 November 2008 21:15 |
varunvir
Messages: 389 Registered: November 2007
|
Senior Member |
|
|
Hi Ebrian,
I am working on 10.2.0.2.I did not test it yet.I will do it on
test server and let you know.
Regards,
Varun Punj,
|
|
|