Batch script to compare backups

April 14, 2011 at 03:39:10
Specs: Windows Server 2003
Hi All
Please help me
I need a batch script to perform the following

We have a schedule daily back of the oracle database whick trunkates the file size to 1 gb each so if the db is 4 gb we will get 4 files that get saved in the \\<backup>\process\<date>\file1.dmp, file2.dmp etc

I have a utility which is xdelta.exe which compares 2 files and gives the difference

My need is the batch script should compare the monday db backup to the sunday db backup and should give the output in a different folder say \\<xdelta>\<date> folder so the xdelta file will compare the first file of sunday with the first file of monday and give the output.

Eg if 10_4_2011 has these files

a.dmp
b.dmp
c.dmp
d.dmp

and 11_4_2011 has

a.dmp
b.dmp
c.dmp
d.dmp
e.dmp

it should compare by the names and xdelta the files the output should go in \\xdelta\11_4_2011

The extra file can be compressed and put in the same folder, xdelta has option to compress too.

There are multiple process and if the process increases the script should support the new process too.

Thanks in advance
I can upload the xdelta file if needed thanks ben


See More: Batch script to compare backups

Report •


#1
April 14, 2011 at 21:43:31
whick trunkates the file size to 1 gb each so if the db is 4 gb we will get 4 files
That's splitting. Truncating a 4 GB DB dump at 1 GB would leave you with a single 1 GB file.

I'm not really sure what you're attempting to do here, but it sounds like a recipe for corrupted backups and unusable restores. Why don't you just backup the redo logs?

How To Ask Questions The Smart Way


Report •

#2
April 15, 2011 at 02:29:08
"I have a utility which is xdelta.exe which compares 2 files and gives the difference"

Command 'fc' does the same thing and it's built in Windows.

Happy is ONE who says I am an OttoMAN.


Report •

#3
April 15, 2011 at 02:31:26
Well, yeah, but xdelta also creates a "patch" between the two files you're comparing, such that you can apply the patch to file A, and get file B.

How To Ask Questions The Smart Way


Report •
Related Solutions


Ask Question