Recovery Manager - Hot Backup [message #397750] |
Mon, 13 April 2009 15:06 |
prafus
Messages: 9 Registered: April 2009
|
Junior Member |
|
|
Hello Experts!
I`m pretty new to Oracle and everything that means backup and restore. I`ve created a hot backup script and I just want to find out a few opinions about it. I need it for a database who has to be 24/7 up and i`m planning to do incremental level 0 database backup every Sunday and incremental level 1 backup every day of the week. So here it is the incremental level 0 script for every Sunday:
Here is the Rman configuration:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'D:\oracle\ora92
\database\controlfile\%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE CHANNEL c1 DEVICE TYPE DISK FORMAT 'C:\backup\backup_DB_%U_%d_%s_%t';
CONFIGURE CHANNEL c2 DEVICE TYPE DISK FORMAT 'D:\oracle\ora92\database\backup\backup_DB_%U_%d_%s_%t';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'D:\ORACLE\ORA92\DATABASE\SNAPSHOTCF\SNCF
ANDREI.ORA';
And now the hot backup scrip for Sunday:
RMAN> run
2> {
3> backup incremental level=0 database plus archivelog tag="full";
4> sql 'alter system archive log current';
5> backup archivelog all format 'C:\backup\log_%U_%d_%s_%t';
6> delete archivelog all completed before 'sysdate-1';
7> crosscheck backup;
8> delete expired backup;
9> crosscheck archivelog all;
10> delete expired archivelog all;
11> delete obsolete;
12> }
I know that i include the archive log in backup and then take backup again...but i just want to know you`re opinion, if the script is good and what you guys as experts would like to change at it! Please answer this post ... you`ll make me feel more confident if you will help.
Thank You, in advance!
|
|
|
Re: Recovery Manager - Hot Backup [message #397751 is a reply to message #397750] |
Mon, 13 April 2009 15:10 |
|
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
Backups are never a problem.
Restore would be
So, backup and do several test restores of all scenarios and document the procedures.
And test if the above said procedures will work as documented.
Randomly do test restores/duplication.
Why do you have two very different channels?
And you are on unsupported version.
[Updated on: Mon, 13 April 2009 15:14] Report message to a moderator
|
|
|
Re: Recovery Manager - Hot Backup [message #397753 is a reply to message #397750] |
Mon, 13 April 2009 15:19 |
prafus
Messages: 9 Registered: April 2009
|
Junior Member |
|
|
As you can see, mister, i did duplexing on different partition, in case that something happens to always have what to restore... and the rest it`s just checkings... I would like to know if "recovery window = 7 days" it`s good how it`s set, and i know that the script work but the "experts eye" can tell a lot only at first sight....so please give me an advice, what to change... or how should I do to improve it and the safety of recovering. Excuse my bad english....and Thank You!
|
|
|
|
|
|
|
Re: Recovery Manager - Hot Backup [message #397762 is a reply to message #397750] |
Mon, 13 April 2009 16:25 |
prafus
Messages: 9 Registered: April 2009
|
Junior Member |
|
|
well here it is: (i bet that a lot of peoples searching this on the web )
Hot Backup (full) with duplexing (made every Sunday):
rman configuration:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'D:\oracle\ora92\database\controlfile\%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 2;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 2;
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'D:\ORACLE\ORA92\DATABASE\SNAPSHOTCF\SNCF
ANDREI.ORA';
script:
RMAN> run
2> {
3> backup incremental level=0 database plus archivelog format 'C:\backup\backup_DB_%U_%d_%s_%t','D:\oracle\ora92\database\backup\backup_DB_%U_%d_%s_%t' tag="full";
4> delete archivelog all completed before 'sysdate-1';
5> crosscheck backup;
6> delete expired backup;
7> crosscheck archivelog all;
8> delete expired archivelog all;
9> delete obsolete;
10> }
Remember this is incomplete... I will post soon the script for backup made over the week....and don`t use it before you test it...
If someone test this script more 'deeply' and has bad/good results please post!
If someone has objections or improvements for it....or anything please post it! Thank you!
[Updated on: Mon, 13 April 2009 16:33] Report message to a moderator
|
|
|
|
Re: Recovery Manager - Hot Backup [message #397766 is a reply to message #397764] |
Mon, 13 April 2009 16:39 |
prafus
Messages: 9 Registered: April 2009
|
Junior Member |
|
|
Quote: | CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
|
it`s "CONFIGURE DEVICE TYPE DISK PARALLELISM 1;" i`m tired it`s 1 am here...
Mister Mahesh Rajendran, Thank You...I visit often this forum and i can see that you keep almost the entire forum alive within you`re good answers. Thank you for the very quick reply! and I hope that you will help me in the future cause i have "tons of questions"...
[Updated on: Mon, 13 April 2009 16:42] Report message to a moderator
|
|
|
|
|
Re: Recovery Manager - Hot Backup [message #397926 is a reply to message #397750] |
Tue, 14 April 2009 10:02 |
prafus
Messages: 9 Registered: April 2009
|
Junior Member |
|
|
Hey BlackSwan!
As you can see in the script above, when doing backup one backup set it`s going to C:\backup and other to D:\oracle\ora92\database\backup.
What I want to know it`s that it`s posible for example one of the backup set to go to a disk of another computer in the network... Hope you understand! my english it`s not such good...
|
|
|
|
|
|
Re: Recovery Manager - Hot Backup [message #398146 is a reply to message #398087] |
Wed, 15 April 2009 06:26 |
|
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
Parallelism depends on number for CPU you have.
Be advised that in this version, it is not real parallelism that is been used.
Only in 11g you can make backups across multiple channels by using multisection backups.
|
|
|