dwhite20899 has asked for the wisdom of the Perl Monks concerning the following question:
I've inherited two postgres databases, a master and a backup, on different machines (on same subnet). I need to verify the backup is complete. There are 60 tables, all under 50,000 rows except for 5 tables with 100M+ rows.
It takes 2 hours to dump a backup, a week to load, so just doing a backup isn't an option. (yet)
I'm thinking of using Perl to do brute force comparisons of the small tables. I can automate column named selects based on the schema docs, and fill a hash based on the table keys with the master data, and compare that to the backup content. I may have to use a cursor, and it may be slow, but it's all I can think of. But I think this will be insane on the big tables.
Has anyone an idea of a better method of attack?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Verifying 2 databases are in sync with brute force
by moritz (Cardinal) on May 31, 2011 at 15:35 UTC | |
by dwhite20899 (Friar) on May 31, 2011 at 17:26 UTC | |
by moritz (Cardinal) on Jun 01, 2011 at 06:29 UTC | |
by perlfan (Parson) on Jun 01, 2011 at 14:32 UTC | |
|
Re: Verifying 2 databases are in sync with brute force
by Sewi (Friar) on May 31, 2011 at 19:42 UTC | |
|
Re: Verifying 2 databases are in sync with brute force
by Anonymous Monk on May 31, 2011 at 23:14 UTC | |
|
Re: Verifying 2 databases are in sync with brute force
by erix (Prior) on Jun 02, 2011 at 18:07 UTC |