public inbox for [email protected]  
help / color / mirror / Atom feed
Re: How to validate restore of backup?
2+ messages / 2 participants
[nested] [flat]

* Re: How to validate restore of backup?
@ 2024-08-22 11:09 Muhammad Usman Khan <[email protected]>
  2024-08-22 11:23 ` Re: How to validate restore of backup? Ron Johnson <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Muhammad Usman Khan @ 2024-08-22 11:09 UTC (permalink / raw)
  To: Vince McMahon <[email protected]>; +Cc: pgsql-generallists.postgresql.org <[email protected]>

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.
>


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: How to validate restore of backup?
  2024-08-22 11:09 Re: How to validate restore of backup? Muhammad Usman Khan <[email protected]>
@ 2024-08-22 11:23 ` Ron Johnson <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Ron Johnson @ 2024-08-22 11:23 UTC (permalink / raw)
  To: pgsql-generallists.postgresql.org <[email protected]>

That's great on small databases.  Not so practical when they're big.

On Thu, Aug 22, 2024 at 7:10 AM Muhammad Usman Khan <[email protected]>
wrote:

> 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.
>>
>

-- 
Death to America, and butter sauce.
Iraq lobster!


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2024-08-22 11:23 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-08-22 11:09 Re: How to validate restore of backup? Muhammad Usman Khan <[email protected]>
2024-08-22 11:23 ` Ron Johnson <[email protected]>

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