Home » RDBMS Server » Backup & Recovery » Simple RMAN question (Oracle 10g, HP-UX)
Simple RMAN question [message #440178] Thu, 21 January 2010 08:18 Go to next message
janvandenheuvel
Messages: 4
Registered: January 2010
Location: Spijkenisse
Junior Member
I have the following simple question:

I would like to make daily, weekly and monthly backupswith RMAN (with a catalog database). I want to make the backup on the FRA and then, when backup is finished, copy them to tape with the OS-backup. After that the backup should be overwritten the next day by the new RMAN backup.

What kind of commands do I need. I don't understand the "configure retention policy to recovery window" principe. Can I simply delete the RMAN backup with an OS-command, just before the next one is started or are there other ways to do this?

Please don't point me to fine manuals because I really don't have much time to read all kind of stuff.....

My thanks in advance!
Re: Simple RMAN question [message #440181 is a reply to message #440178] Thu, 21 January 2010 08:23 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
>>Can I simply delete the RMAN backup with an OS-command,
Yes. And you should keep the catalog informed about it by marking them unavailable manually.
It is much better to use retention policy and related functionality where RMAN will take care of it.
>>Please don't point me to fine manuals because I really don't have much time to read all kind of stuff.....
Unfortunately, not everyone has the time to retype everything that is already clearly mentioned in manuals.
Re: Simple RMAN question [message #440183 is a reply to message #440181] Thu, 21 January 2010 08:34 Go to previous messageGo to next message
janvandenheuvel
Messages: 4
Registered: January 2010
Location: Spijkenisse
Junior Member
Mahesh Rajendran wrote on Thu, 21 January 2010 15:23
>>Can I simply delete the RMAN backup with an OS-command,
Yes. And you should keep the catalog informed about it by marking them unavailable manually.
It is much better to use retention policy and related functionality where RMAN will take care of it.
>>Please don't point me to fine manuals because I really don't have much time to read all kind of stuff.....
Unfortunately, not everyone has the time to retype everything that is already clearly mentioned in manuals.


Was afraid you would say that.... Laughing

Can you tell me how I should set the "configure retention policy to recovery window of ?? days" for daily, weekly and monthly backups?
And how do I make the backups unavailable manually?

Thanks again!
icon6.gif  Re: Simple RMAN question [message #440204 is a reply to message #440183] Thu, 21 January 2010 10:20 Go to previous messageGo to next message
LKBrwn_DBA
Messages: 487
Registered: July 2003
Location: WPB, FL
Senior Member
janvandenheuvel wrote on Thu, 21 January 2010 09:34
Can you tell me how I should set the "configure retention policy to recovery window of ?? days" for daily, weekly and monthly backups?
And how do I make the backups unavailable manually?

Why would you want to keep old backups (monthly/weekly) on disk?
If you are doing incremental backups, set the retention period to the number of days between level 0 (full) backups, otherwise set the retention period to as many days you need to ensure it has been copied to tape.

To make backups unavailable, use the CHANGE command.


[Updated on: Thu, 21 January 2010 10:34] by Moderator

Report message to a moderator

Re: Simple RMAN question [message #440207 is a reply to message #440183] Thu, 21 January 2010 10:28 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Retention Policy is what you want to keep that would be required to recover a database upto a point specified by recovery window.
Beyond that point, the backupsets are "obsolete" and not required for recovery. If those backupsets are no more available in disk, they are marked "expired".
Look into recovery window based retention or redundancy based retention.

>>And how do I make the backups unavailable manually?
Here is an example.
http://www.orafaq.com/forum/mv/msg/26739/73252/42800/#msg_73252
Re: Simple RMAN question [message #441631 is a reply to message #440207] Tue, 02 February 2010 05:22 Go to previous messageGo to next message
janvandenheuvel
Messages: 4
Registered: January 2010
Location: Spijkenisse
Junior Member
Sorry but I still don't understand it....

I want to do the following:

Before I start the daily-rman backup I want to delete the old backup of yesterday via OS-command. This resides in the flashback area but is back upped on tape after the rman backup.
I have to mark this OS-deleted backup as unavailable in the catalog, I presume?

When I do this (delete old backup on OS) and then:

RMAN> list backup;
Lijst met backupsets.
===================

BS-sleutel Type LV Grootte Apparaattype Verstreken tijd Voltooiingstijd
------- ---- -- ---------- ----------- ------------ ---------------
2890 Full 23.01M DISK 00:00:12 02-02-10
BP-sleutel: 2892 Status: AVAILABLE Gecomprimeerd: YES Tag: DDSTDAGBACKUP
Onderdelennaam: /oracle/ddst/flashback/DDST/backupset/2010_02_02/o1_mf_nnndf_DDSTDAGB ACKUP_5pj0n10l_.bkp
Lijst met gegevensbestanden in backupset 2890.
Bestand LV Type Ckp SCN Ckp-tijd Naam
---- -- ---- ---------- -------- ----
2 Full 1025880 02-02-10 /oracle/ddst/oradata/ddst_undotbs_01.dbf
3 Full 1025880 02-02-10 /oracle/ddst/oradata/ddst_sysaux_01.dbf

BS-sleutel Type LV Grootte Apparaattype Verstreken tijd Voltooiingstijd
------- ---- -- ---------- ----------- ------------ ---------------
2891 Full 83.87M DISK 00:00:30 02-02-10
BP-sleutel: 2893 Status: AVAILABLE Gecomprimeerd: YES Tag: DDSTDAGBACKUP
Onderdelennaam: /oracle/ddst/flashback/DDST/backupset/2010_02_02/o1_mf_nnndf_DDSTDAGB ACKUP_5pj0n109_.bkp
Lijst met gegevensbestanden in backupset 2891.
Bestand LV Type Ckp SCN Ckp-tijd Naam
---- -- ---- ---------- -------- ----
1 Full 1025879 02-02-10 /oracle/ddst/oradata/ddst_system_01.dbf
4 Full 1025879 02-02-10 /oracle/ddst/oradata/ddst_users_01.dbf

BS-sleutel Grootte Apparaattype Verstreken tijd Voltooiingstijd
------- ---------- ----------- ------------ ---------------
2909 1.40M DISK 00:00:01 02-02-10
BP-sleutel: 2912 Status: AVAILABLE Gecomprimeerd: NO Tag: TAG20100202T114700
Onderdelennaam: /oracle/ddst/flashback/DDST/backupset/2010_02_02/o1_mf_annnn_TAG20100 202T114700_5pj0o5sd_.bkp

Lijst met gearchiveerde logbestanden in backupset 2909.
Drd volgnr Minimum SCN Minimumtijd Volgende SCN Volgende tijd
---- ------- ---------- ----------- ---------- ---------
1 11 1024219 02-02-10 1025916 02-02-10

BS-sleutel Type LV Grootte Apparaattype Verstreken tijd Voltooiingstijd
------- ---- -- ---------- ----------- ------------ ---------------
2919 Full 6.80M DISK 00:00:00 02-02-10
BP-sleutel: 2921 Status: AVAILABLE Gecomprimeerd: NO Tag: TAG20100202T114703
Onderdelennaam: /oracle/ddst/flashback/DDST/autobackup/2010_02_02/o1_mf_s_709904823_5 pj0o7q7_.bkp
Inclusief control-bestand: Ckp SCN: 1025933 Ckp-tijd: 02-02-10
Inclusief SPFILE: Wijzigingstijd: 27-01-10


When I try to make the set unavailable I get an error:

RMAN> change backupset 2890 unavailable;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: Opdracht unavailable mislukt in kanaal default in 02/02/2010 12:01:52
ORA-19813: niet-beschikbaar bestand /oracle/ddst/flashback/DDST/backupset/2010_02_02/o1_mf_nnndf_DDSTDAGBACKUP_5pj0n10l_.bkp in DB_RECOVERY_FILE_DEST niet mogelijk


So I want to
1. delete old backup of yesterday on OS-level before starting rman backup of today
2. make this unavailable in catalog
3. start new rman backup

and so on.

Many thanks for advice!!!!
Re: Simple RMAN question [message #441647 is a reply to message #441631] Tue, 02 February 2010 06:50 Go to previous messageGo to next message
LKBrwn_DBA
Messages: 487
Registered: July 2003
Location: WPB, FL
Senior Member
janvandenheuvel wrote on Tue, 02 February 2010 06:22

I want to do the following:

1. delete old backup of yesterday on OS-level before starting rman backup of today
2. make this unavailable in catalog
3. start new rman backup

and so on.


You should follow the advice given by the experts that have posted on this thread; here is an example of what you could do (maybe not in that same order):

1) Configure your retention period to one day:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;

2) Do backup similar to this:
CROSSCHECK BACKUP;
CROSSCHECK ARCHIVELOG ALL;
RUN {
        BACKUP DATABASE
        PLUS ARCHIVELOG DELETE INPUT
        INCLUDE CURRENT CONTROLFILE;
}
DELETE NOPROMPT OBSOLETE;

The above command(s) will remove the 'obsolete' files for you.
/forum/fa/2115/0/
Re: Simple RMAN question [message #441701 is a reply to message #441647] Tue, 02 February 2010 15:51 Go to previous messageGo to next message
janvandenheuvel
Messages: 4
Registered: January 2010
Location: Spijkenisse
Junior Member
LKBrwn_DBA wrote on Tue, 02 February 2010 13:50

1) Configure your retention period to one day:


And what do I have to do if I want to restore from one week ago?
Re: Simple RMAN question [message #441877 is a reply to message #441701] Wed, 03 February 2010 10:10 Go to previous message
LKBrwn_DBA
Messages: 487
Registered: July 2003
Location: WPB, FL
Senior Member
janvandenheuvel wrote on Tue, 02 February 2010 16:51

And what do I have to do if I want to restore from one week ago?

You are copying the backup files to tape, you restore from there.

The suggestion of configuring retention to 1 day (or more) is that the DELETE OBSOLETE rman command will remove the disk backups automatically. Anyway, rman does not know of the tape backups, so the retention of the backups on tape will depend on the setting in the tape catalog.

Therefore I and what other experts stated is that you configure the retention period to whatever number of days you need for recovery and if you are backing to disk, then those are the number of days (or more) the backup will be preserved on disk.

Now if you then go and forcefully remove the files, then your backup management becomes manual and not automatic and would be the equivalent of bypassing the retention period of the backup.



[Updated on: Wed, 03 February 2010 10:15] by Moderator

Report message to a moderator

Previous Topic: Copy Oracle DB from one server to another
Next Topic: Database upgrade process and steps
Goto Forum:
  


Current Time: Sun Nov 24 18:44:26 CST 2024