| From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
|---|---|
| To: | dfgpostgres <dfgpostgres3(at)gmail(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: can recs be transferred between DBs ? |
| Date: | 2026-04-28 16:05:31 |
| Message-ID: | CAKFQuwbyRfoacj=OPEt6dmpF3sTiDvZ7ujtVVRXhjhO3vRn24g@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Tue, Apr 28, 2026 at 8:56 AM dfgpostgres <dfgpostgres3(at)gmail(dot)com> wrote:
>
> The managers tell me that they want to restore "beta" back to the main DB.
> I know I could do this with something like a perl script, making
> connections to both DBs and transferring them over using select statements
> in "beta_archive" and insert statements in the main DB. But is there a
> better way, something inherent in PG SQL that allows me to do something
> like this ?
>
>
pg_dump / pg_restore are the core tools at your disposal. The ability to
specify --inserts and --on-conflict-do-nothing on pg_dump in particular
make at least attempting this against a copy of the backups quite appealing
before trying to write a more targeted transfer script.
David J.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Adrian Klaver | 2026-04-28 16:27:07 | Re: can recs be transferred between DBs ? |
| Previous Message | Ron Johnson | 2026-04-28 16:00:09 | Re: can recs be transferred between DBs ? |