Home » RDBMS Server » Backup & Recovery » Storing RMAN Backup at different locations. (10.2.0.2)
Storing RMAN Backup at different locations. [message #356415] Thu, 30 October 2008 12:08 Go to next message
varunvir
Messages: 389
Registered: November 2007
Senior Member
Hi Experts,
Can I give different backup location for backups sets and archive logs with format caomand in the same script.
Currently my RMAN Comand is:-
run {
     allocate channel chan1 type disk format '/data2/orabackup/BHI_1/rman/0/%d%U
.rman0';
     set limit channel chan1 kbytes=2000000;
     backup as compressed backupset incremental level 0 filesperset 1 database;
     sql 'alter system switch logfile';
     backup archivelog all;
     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 archivelog all completed before 'sysdate-4' backed up 1 ti
mes to device type disk;
     delete noprompt expired backup;
     delete noprompt obsolete backup;
#     delete noprompt expired archivelog all;
     release channel chan1;
    }

According to current policy all the backups are getting stored
into '/data2/orabackup/BHI_1/rman/0/%d%U.rman0'
I want archive logs to be stored at different disk due to space
issues on disk /data2.
How can I acheive this in the same script.
Regards,
Varun Punj
Re: Storing RMAN Backup at different locations. [message #356417 is a reply to message #356415] Thu, 30 October 2008 12:11 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Release the channel and allocate a new one or use format in backup archivelog statement.

Regards
Michel

Re: Storing RMAN Backup at different locations. [message #356418 is a reply to message #356415] Thu, 30 October 2008 12:27 Go to previous messageGo to next message
varunvir
Messages: 389
Registered: November 2007
Senior Member
Thanks Michel for your response.
So you mean I can run two different scripts with two different channels:-
1,One for database
2,The other one for archivelogs.
Please correct me If I am wrong.
Regards,
Varun Punj,
Re: Storing RMAN Backup at different locations. [message #356432 is a reply to message #356418] Thu, 30 October 2008 13:08 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
You can
1/ Use 2 run
2/ Use 1 run but release and reallocate the channel in the middle
3/ Use "format" clause on a statement to overwrite the default "format" of your channel.

Regards
Michel
Re: Storing RMAN Backup at different locations. [message #356445 is a reply to message #356432] Thu, 30 October 2008 13:45 Go to previous messageGo to next message
varunvir
Messages: 389
Registered: November 2007
Senior Member
Thanks Michel
Re: Storing RMAN Backup at different locations. [message #357060 is a reply to message #356432] Mon, 03 November 2008 13:35 Go to previous messageGo to next message
varunvir
Messages: 389
Registered: November 2007
Senior Member
Hi Michel,
I have changed the backup plan as suggested by you by allocating three channels.The new backup plan is:-
run {
     allocate channel chan1 type disk format '/data3/orabackup/BHI_1/rman/0/%d%U
.rman0';
     allocate channel chan2 type disk format '/data2/orabackup/BHI_1/rman/0/%d%U
.rman0';
     allocate channel chan3 type disk format '/data4/orabackup/BHI_1/rman/0/%d%U
.rman0';
     set limit channel chan1 kbytes=2000000;
     set limit channel chan2 kbytes=2000000;
     set limit channel chan3 kbytes=2000000;
     backup as compressed backupset incremental level 0 filesperset 1 database;
     sql 'alter system switch logfile';
     backup archivelog all not backed up 1 times;
     backup current controlfile tag = 'BHI_1-ctl' format = '/data2/orabackup/BHI
_1/rman/0/ctl_%d_%U';
     restore database validate check logical;
     delete noprompt archivelog all completed before 'sysdate-4' backed up 1 tim
es to device type disk;
     crosscheck backup;
     crosscheck archivelog all;
     delete noprompt expired backup;
     delete noprompt obsolete;
     release channel chan1;
     release channel chan2;
     release channel chan3;
    }

Redundancy is set to recovery window of 1 day.
I have one question now.With this backup plan I should be able
to keep 4 days old archive logs on the disk as I am giving
delete noprompt archivelog all completed before 'sysdate-4' backed up 1 times to device type disk.
But I cannot see archive logs older than 2 days on the disk.
Is there anything I am missunderstood.Can You please let me
know what change I can make to keep the archive logs for four
days at the disk on the achive_log_dest location.
Regards,
Varun Punj

[Updated on: Mon, 03 November 2008 13:37]

Report message to a moderator

Re: Storing RMAN Backup at different locations. [message #357061 is a reply to message #357060] Mon, 03 November 2008 13:40 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
If you configure the recovery windows to 1 day, the archived logs older than 2 days are of no use (if you back up every day), so "delete obsolete" deletes them.

Regards
Michel
Re: Storing RMAN Backup at different locations. [message #357064 is a reply to message #357061] Mon, 03 November 2008 14:02 Go to previous messageGo to next message
varunvir
Messages: 389
Registered: November 2007
Senior Member
Thanks for your reply.I have one more question:-
Is this policy appropriate for stream environment.
Delete Obsolete wont delete if stream needs the required
archive logs.I can not test it because it is production
environment.Please tell me If I my statement is wrong.
Regards,
Varun Punj
Re: Storing RMAN Backup at different locations. [message #357066 is a reply to message #357064] Mon, 03 November 2008 14:19 Go to previous message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
I don't know, it depends on so many things depending on your environment: how far you should be able to go back, reliability on your network and systems...

Regards
Michel
Previous Topic: RMAN - script
Next Topic: incerase tablespace through wizard
Goto Forum:
  


Current Time: Fri Nov 22 12:25:04 CST 2024