cancel
Showing results for 
Search instead for 
Did you mean: 

brarchive option for two copies and deletion if at least one copy

benoit-schmid
Contributor
0 Kudos

Good morning,

We are currently archiving our Oracle archive redos on tapes with legato/networker.

When these files are backed up, we delete them from disk.

Our current options are: brarchive -sd -c -f 1

What we would like to do is to store two copies (one with networker and one on a nfs mounted partition or copied with rsync).

In order to avoid filling the disk, we would like to delete the archive on disk if at least (1 or 2 but not 0) one copy has been successful.

Which options should I provide to brarchive to do so?

Thanks in advance for your answers.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member524429
Active Contributor
0 Kudos

Hi,

You can use -cds option (copy_delete_save) with brarchive for your requirement.

Please refer[ this useful link|http://help.sap.com/saphelp_40b/helpdata/pt/0d/d30d544a0c11d182b80000e829fbfe/content.htm] to get more information about such available options.

Also, You can fix this by providing such function (copy_delete_save) in archive_function parameter of init<SID>.sap file.

Regards,

Bhavik G. Shroff

benoit-schmid
Contributor
0 Kudos

>

> Hi,

>

> You can use -cds option (copy_delete_save) with brarchive for your requirement.

> Please refer[ this useful link|http://help.sap.com/saphelp_40b/helpdata/pt/0d/d30d544a0c11d182b80000e829fbfe/content.htm] to get more information about such available options.

>

> Also, You can fix this by providing such function (copy_delete_save) in archive_function parameter of init<SID>.sap file.

>

>

> Regards,

> Bhavik G. Shroff

Good afternoon, Bhavik,

I had already read the doc. But I am a little confused as there are no examples.

From what I understand -cds option deletes the file if the copy has been a success.

This option is too strong for our case.

How could I tell brarchive that it could delete if at least one copy has been successful?

Thanks in advance for your help.

former_member524429
Active Contributor
0 Kudos

Hi,

With the option copy_delete_save or -cds :

Initially Offline Redo Log file will be created with ARCHIVE Status.

-> On First Run of BRARCHIVE, all Offline redo log files which are having ARCHIVE status will be backed up on to Tape and will be marked with SAVED Status upon completion on BRARCHIVE.

-> On Second Run, First, all offline redo log files with status SAVED will be saved to tape for a second time, and subsequently will be deleted from disk. Then, all offline redo log files which are having the status ARCHIVE are backed up to tape for the first time, and their status is changed to SAVED for next BRARCHIVE run.

After the backup, all offline redo log files exist at two locations: either in directory oraarch and on tape, or on two different tapes.

Regards

Bhavik G. Shroff

benoit-schmid
Contributor
0 Kudos

Good afternoon,

Unfortunately I am still not understanding everything.

>

> -> On First Run of BRARCHIVE, all Offline redo log files which are having ARCHIVE status will be backed up on to Tape and will be marked with SAVED Status upon completion on BRARCHIVE.

Is it marked as save if the backup is not completed?

> -> On Second Run, First, all offline redo log files with status SAVED will be saved to tape for a second time, and subsequently will be deleted from disk. Then, all offline redo log files which are having the status ARCHIVE are backed up to tape for the first time, and their status is changed to SAVED for next BRARCHIVE run.

Is it deleted if the file can not be copied?

> After the backup, all offline redo log files exist at two locations: either in directory oraarch and on tape, or on two different tapes.

>

Yes but I think that the files are deleted only if they are are copied twice.

What i would like is that files are deleted even if there is a single copy.

Thanks in advance for your help.

former_member524429
Active Contributor
0 Kudos

Hi,

What i would like is that files are deleted even if there is a single copy.

then,,Your current BRARCHIVE operation is already running with -sd option, which will fulfill your requirement. Upon completion of single file, it will delete it from the disk.

with this option, the BRARCHIVE run for a single Offline Redo log file will be as followed:

BR0010I BRARCHIVE function ID: svd
BR0048I Archive function: save_delete
BR0011I 43 offline redo log files found for processing, total size 4039.460 MB
BR0111I Files will be compressed
.
.
BR0198I Profiles saved successfully
BR0201I Compressing I:\oracle\D78\oraarch\D78ARCH1_25079_647284503.DBF
BR0203I to G:\redobkp\D78ARCH1_25079_647284503.DBF.Z ...
#ARCHIVE.. I:\oracle\D78\oraarch\D78ARCH1_25079_647284503.DBF
#SAVED.... G:\redobkp\D78ARCH1_25079_647284503.DBF.Z  #1/1  3.3367:1  29509288
BR0280I BRARCHIVE time stamp: 2010-02-23 06.49.31
BR0015I Offline redo log file I:\oracle\D78\oraarch\D78ARCH1_25079_647284503.DBF deleted
BR0280I BRARCHIVE time stamp: 2010-02-23 06.49.31
BR0014I 1 of 43 offline redo log files processed - 93.901 MB of 4039.460 MB done
.
.
.

Regards

Bhavik G. Shroff

benoit-schmid
Contributor
0 Kudos

Good afternoon,

> then,,Your current BRARCHIVE operation is already running with -sd option, which will fulfill your requirement. Upon completion of single file, it will delete it from the disk.

I agree that it already does a single copy.

But then, it deletes the archive redo only if the first backup succeed.

With the -sd it will not:

1. Try to do a second copy

2. Delete the redo if it succeeds the second copy (copy) but failed to first copy (archive)

With the -scd (as far as I understand) it does not:

1. Delete the redo if the first copy succeeded but the second failed

2. Delete the redo if the first copy failed but the second succeeded

Basically It does the delete if the first AND the second copy succeed.

But how can I configure so that if first OR the second copy succeed.

Thanks in advance for your answers.

Former Member
0 Kudos

You could create 2 initSID.sap files, one for the tape backup (initSID.tape) and the other for the disk backup (initSID.disk).

Create a shell script that calls the tape backup first and if it fails, calls the disk backup eg

#!/bin/sh

brarchive -c -p initSID.tape -sd (other options here) || brarchive -c -p initSID.disk -sd (other options here)

However, I wouldn't recommend doing anything like this. Your redo logs are critical for the recovery of the database. With the above script you will only have 1 copy of the redo log and you will not be able to easily tell which location the redo log backup is. You will also have to manage the disk space where the redo logs are copied.

Regards

Doug

benoit-schmid
Contributor
0 Kudos

Good afternoon Doug,

Thanks for the tip.

What I may do in order to avoid having to do this config would be to copy and disk on another host.

Then the second copy (and deletion on copy success), to tapes, could be made from this second host.

This would avoid filling the disk in my production system, when the robot is not available.

It would also ensure me that I have two copies as you mentioned that it is critic two have two independent copies.

Regards,