RE: Grid control rman backup not deleting old backups or archive logs

From: Schauss, Peter (ESS) <"Schauss,>
Date: Wed, 29 May 2013 19:55:16 +0000
Message-ID: <8AE45871F749FC4CBBE053CF2F8A493C0D166937_at_XMBVAG74.northgrum.com>



Under Manage Current Backups->Delete all Obsolete, I found a way to create and schedule a job which would delete the backup sets so I have that part of the problem solved.

Jobs->Job Library->Create Library Job (RMAN Script) lets me create a job to run an RMAN script. I created a job to run the following script:

run{
delete noprompt archivelog until time 'sysdate-2'; }
Exit

This seems to work, but complains that the archive logs have not had enough backups. I changed my policy from requiring 2 backups to requiring one, but I still get the same message. The output of the backup job says that it is skipping logs which have already been backed up once. How do I get it to back them up twice or backup all of the existing logs?

On my UNIX systems, I am using the following script: run {

        allocate channel ch1 type disk format '$BACKUP_DIR2/${BASE_NAME}_1_%U.rbk';
        allocate channel ch2 type disk format '$BACKUP_DIR2/${BASE_NAME}_2_%U.rbk';
        allocate channel ch3 type disk format '$BACKUP_DIR2/${BASE_NAME}_3_%U.rbk';
        allocate channel ch4 type disk format '$BACKUP_DIR2/${BASE_NAME}_4_%U.rbk';
        allocate channel ch5 type disk format '$BACKUP_DIR2/${BASE_NAME}_5_%U.rbk';
        allocate channel ch6 type disk format '$BACKUP_DIR2/${BASE_NAME}_6_%U.rbk';
        backup database plus archivelog;
        delete noprompt archivelog until time 'sysdate-1';
        backup current controlfile for standby;
        sql 'ALTER SYSTEM ARCHIVE LOG CURRENT';
}
exit

Where BACKUP_DIR2 and BASE_NAME are defined earlier in the ksh script.

I have verified that I can restore a database backed up this way on UNIX, so my ideal solution here would be to implement this script from Grid Control. How would I translate this script into a Grid Control job? Ideally, I would like to add this to my job library as a generic script to backup each of my databases to their own folders.

Thanks,
Peter Schauss

-----Original Message-----

From: Patterson, Joel [mailto:jpatterson_at_entint.com] Sent: Wednesday, May 29, 2013 3:20 PM
To: Schauss, Peter (ESS); oracle-l_at_freelists.org Subject: EXT :RE: Grid control rman backup not deleting old backups or archive logs

Ok, that was just to see if the archive logs needed to go back to the level 0 day..

The user running the oracle service was so that you can write to network drives which it appears you can, so it is not local system.

Joel Patterson
Database Administrator
904 928-2790

--

Joel Patterson
Sr. Database Administrator | Enterprise Integration Phone: 904-928-2790 | Fax: 904-733-4916
http://www.entint.com/

http://www.entint.com/

http://www.facebook.com/pages/Enterprise-Integration/212351215444231 http://twitter.com/#!/entint http://www.linkedin.com/company/18276?trk=tyah http://www.youtube.com/user/ValueofIT

This message (and any associated files) is intended only for the use of the addressee and may contain information that is confidential, subject to copyright or constitutes a trade secret. If you are not the intended recipient, you are hereby notified that any dissemination, copying or distribution of this message, or files associated with this message, is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and deleting it from your computer. Messages sent to and from us may be monitored. Any views or opinions presented are solely those of the author and do not necessarily represent those of the company. [v.1.1]

From: Schauss, Peter (ESS) [mailto:peter.schauss_at_ngc.com] Sent: Wednesday, May 29, 2013 2:14 PM
To: Patterson, Joel; oracle-l_at_freelists.org Subject: RE: Grid control rman backup not deleting old backups or archive logs

Joel,

We are backing up to a SAN drive and using TSM to backup the files off line. (This is a relatively small database, about 65 gb, so we are not doing incrementals.

  • Peter Schauss

-----Original Message-----

From: Patterson, Joel [mailto:jpatterson_at_entint.com] Sent: Tuesday, May 28, 2013 12:02 PM
To: Schauss, Peter (ESS); oracle-l_at_freelists.org Subject: EXT :RE: Grid control rman backup not deleting old backups or archive logs

Just to check a couple things. Are you backing up to a Network drive -- (if so I assume the oracle service is not Local System). Are you doing incrementals?

Joel Patterson
Database Administrator
904 928-2790

--

Joel Patterson
Sr. Database Administrator | Enterprise Integration Phone: 904-928-2790 | Fax: 904-733-4916
http://www.entint.com/

http://www.entint.com/

http://www.facebook.com/pages/Enterprise-Integration/212351215444231 http://twitter.com/#!/entint http://www.linkedin.com/company/18276?trk=tyah http://www.youtube.com/user/ValueofIT

This message (and any associated files) is intended only for the use of the addressee and may contain information that is confidential, subject to copyright or constitutes a trade secret. If you are not the intended recipient, you are hereby notified that any dissemination, copying or distribution of this message, or files associated with this message, is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and deleting it from your computer. Messages sent to and from us may be monitored. Any views or opinions presented are solely those of the author and do not necessarily represent those of the company. [v.1.1]

From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Schauss, Peter (ESS) Sent: Tuesday, May 28, 2013 11:19 AM
To: oracle-l_at_freelists.org
Subject: Grid control rman backup not deleting old backups or archive logs

This is Oracle 11.2.0.3 running on Windows Server 2003 v 5.2 SP2 (64 bit), Grid Control 11g.

Under backup settings -> policy I specified:

        Retain at least 2 backups
        Retain archived redo logs after they have been backed up twice.
        I also specified backup of the control file and verified from the log files that it is being backed up.

Under schedule backup I specified a customized backup, checking off datafiles and archived logs.

I am using the control file as the repository.

I tested my backup by cloning the database from the backup set. (Was that a valid test?)

Looking at the folders where the backups and archive logs are stored, I see that the job is not deleting the backups and archive logs older than 2 days. On my UNIX servers my rman script does this automatically. Do I have to create a separate Grid Control job for this?

Thanks,
Peter Schauss

--

http://www.freelists.org/webpage/oracle-l

--

http://www.freelists.org/webpage/oracle-l Received on Wed May 29 2013 - 21:55:16 CEST

Original text of this message