public inbox for [email protected]
help / color / mirror / Atom feedFrom: Ron Johnson <[email protected]>
To: pgsql-generallists.postgresql.org <[email protected]>
Subject: Re: How to validate restore of backup?
Date: Thu, 22 Aug 2024 07:21:52 -0400
Message-ID: <CANzqJaAaQLUzmLKTaSUzrQc7Q+Ref3LO6nxs1=bZHOJFfSpDrw@mail.gmail.com> (raw)
In-Reply-To: <CAKS+vVZSg=LDpFThxZQyemYE470Hbb15W-YZDHv=-fEZjML2QA@mail.gmail.com>
References: <CAKS+vVZSg=LDpFThxZQyemYE470Hbb15W-YZDHv=-fEZjML2QA@mail.gmail.com>
On Thu, Aug 22, 2024 at 7:06 AM 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?
>
pg_restore is just a bunch of CREATE, COPY and ALTER statements, since
pg_restore replays what was generated by pg_dump.
There can be errors, of course. That's why I run "createdb $DB 2>
/dev/null" to ensure that there's something for pg_restore to drop, then
"pg_restore --create --clean --exit-on-error", and *most importantly*,
check the return code!!!
How to properly handle the materialized views when backing up and restoring?
>
> Thanks.
>
--
Death to America, and butter sauce.
Iraq lobster!
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]
Subject: Re: How to validate restore of backup?
In-Reply-To: <CANzqJaAaQLUzmLKTaSUzrQc7Q+Ref3LO6nxs1=bZHOJFfSpDrw@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