Re: How to validate restore of backup? - Mailing list pgsql-general

From Muhammad Usman Khan
Subject Re: How to validate restore of backup?
Date
Msg-id CAPnRvGsmb57R7cD3KFjN6p=YrxXen-E_Xbs9QKHx7REKQfz--g@mail.gmail.com
Whole thread Raw
In response to How to validate restore of backup?  (Vince McMahon <sippingonesandzeros@gmail.com>)
Responses Re: How to validate restore of backup?
List pgsql-general
Hi Vince,
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. Adjust your port and databases accordingly.

On Thu, 22 Aug 2024 at 16:06, Vince McMahon <sippingonesandzeros@gmail.com> wrote:
Hi,

I have some questions When doing pg_restore of backup of a database to a NEW server.  

Is there a way to ensure the data integrity is in tact, and user ID and access works liked how it was in the old server?

How to properly handle the materialized views when backing up and restoring?

Thanks.

pgsql-general by date:

Previous
From: Vince McMahon
Date:
Subject: How to validate restore of backup?
Next
From: Ron Johnson
Date:
Subject: Re: How to validate restore of backup?