public inbox for [email protected]  
help / color / mirror / Atom feed
From: Muhammad Usman Khan <[email protected]>
To: Vince McMahon <[email protected]>
Cc: pgsql-generallists.postgresql.org <[email protected]>
Subject: Re: How to validate restore of backup?
Date: Thu, 22 Aug 2024 16:09:47 +0500
Message-ID: <CAPnRvGsmb57R7cD3KFjN6p=YrxXen-E_Xbs9QKHx7REKQfz--g@mail.gmail.com> (raw)
In-Reply-To: <CAKS+vVZSg=LDpFThxZQyemYE470Hbb15W-YZDHv=-fEZjML2QA@mail.gmail.com>
References: <CAKS+vVZSg=LDpFThxZQyemYE470Hbb15W-YZDHv=-fEZjML2QA@mail.gmail.com>

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 <[email protected]>
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.
>


view thread (2+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: How to validate restore of backup?
  In-Reply-To: <CAPnRvGsmb57R7cD3KFjN6p=YrxXen-E_Xbs9QKHx7REKQfz--g@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox