1748123 Members
3343 Online
108758 Solutions
New Discussion юеВ

check sum digit

 
SOLVED
Go to solution
Alfredo Raymundo
Contributor

check sum digit

I have an oracle database and i perform a backup (oracle exp utility) then i gzip the dmp files and at last i tar the gziped files to a tape. Is it posible to have a check sum digit so that i can assure that all the information in the disk (gziped files) is in the tape ? That is for auditing purposes in the case that i want to recover the information from the tape in another server.

Thanks in Advance
3 REPLIES 3
Jeff Schussele
Honored Contributor
Solution

Re: check sum digit

Hi,

Sure - just write a script that runs the cksum against the file before it's gzipped & write the value and the filename to the same line in a file that will be tarred up with the gzip files. Then after the untar & gunzip run cksum & compare the result to what you stored in the file.
You could even cksum the gzipped files before they are tarred & hold that in another file to check immediately following the tar -x.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
A. Clay Stephenson
Acclaimed Contributor

Re: check sum digit

You could leverage the cksum command to do this. I would run cksum against each file and write a file that contains the filename and the cksum. I would then write this file to the tape itself (using a norewind device) and then the tar image would be the next file on the tape. When the files are restored, you now have a method of comparing the original CRC cksum to the restored files cksum.

NOTE: Assuming that you are using a tape drive with hardware compression, you could very well be adding extra time to the backup/restore process and not saving any media by using gzip. I would try this without gzip and you may find that the hardware is better at compressing and faster than your methods --- and one possible source of data corruption is eliminated.
If it ain't broke, I can fix that.
Volker Borowski
Honored Contributor

Re: check sum digit

Alfredo,

just to make it clear:
An export is not a backup !

1) It allows you only to restore exactly the data that is inside the dump, no recovery is possible
2) The data in the dump will be inconsistent, if the dump is taken while the application is up and running.

You should consider to study rman-features or copy the database datafiles while the database is shutdown or in backup mode.
There are a bunch of threads on this. Just search the forums.

Volker