Re: How to validate restore of backup?

From: "Peter J(dot) Holzer" <hjp-pgsql(at)hjp(dot)at>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: How to validate restore of backup?
Date: 2024-08-23 11:12:02
Message-ID: 20240823111202.fnlilxxsoojg3tbg@hjp.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2024-08-23 08:13:40 +0200, Peter J. Holzer wrote:
> On 2024-08-22 16:09:47 +0500, Muhammad Usman Khan wrote:
> > For validation of databases, you can use the following approach
> >
> > /usr/pgsql-16/bin/pg_dump -d postgres -h localhost -p 5428 | md5sum > /var/lib/
> > pgsql/db1.txt
> > /usr/pgsql-16/bin/pg_dump -d postgres -h localhost -p 5420 | md5sum > /var/lib/
> > pgsql/db2.txt
> > diff db1.txt db2.txt
> >
> > By executing above queries, if diff is null then it means there is no
> > difference between source and destination databases.
>
> But on the other hand, if the diff is null, it doesn't mean there is a

That should have read "if the diff is NOT null", of course.

> (meaningful) difference between the databases.

hp

--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | hjp(at)hjp(dot)at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Arbol One 2024-08-23 11:55:02 Re: Where is my app installed?
Previous Message Peter J. Holzer 2024-08-23 06:13:40 Re: How to validate restore of backup?