Re: Archive log files to two locations?

From: Mark Clark <mc_at_pst.bt.co.uk>
Date: 4 Jan 1995 15:32:18 GMT
Message-ID: <3eef22$l6v_at_pheidippides.axion.bt.co.uk>


> it does not seem possible to have the log files archived to two
> seperate directories at the same time. if this is the case, does anyone
> have a shell script or any advice on how to accomplish this?

Theres little need to do so really, if you ensure that the archive redo logs are kept on a seperate device from the remainder of the db the media failure resulting in the loss of this device will not affect the remainder of the db (until log switch anyway - at which point the rdbms will halt).

If another device fails the archived redo logs will remain unaffected and can then be used for media recovery.

The likelyhood of two devices failing are fairly slim these days, but in case you could do something like so ;-

(bourne shell)

	ls "destination file spec" >dest
	ls "source file spec" >src

	for filename in `diff src dest|grep "<" |cut -f2  -d " "`
	do
	cp $file "destination file spec"
	done

This will simply copy those that do not appear in the destination file spec (ie; your second copy) from the source. The script should work OK, run it once per hour or less frequently depending on the frequency of your systems log switching.

Rgds Mark Clark          Received on Wed Jan 04 1995 - 16:32:18 CET

Original text of this message