If you're upgrading to a new PC instead of upgrading Slackware and PG on an
existing PC, then something like this will work from the new system:
pg_dumpall -g --host=old_pc | psql -d postgres
for db in x, y, z; do
    pg_dump --host=old_pc -Fp $db | psql $db
done

(I might be missing some required options, since I don't do this
very often.)

On Mon, Sep 14, 2026 at 5:44 PM Rich Shepard <[email protected]>
wrote:

> On Mon, 14 Sep 2026, Ron Johnson wrote:
>
> > Yes.  Note, though, that a single .sql file is the *slow* way to
> > export/import a database, especially if it's of any size.
>
> Ron,
>
> My databases are small and I'll transfer them one-at-a-time rather than the
> whole custer itself.
>
> > Multithreaded export import is faster.  Something like this is what I'd
> do:
> >
> > Current system:
> > cd /path/to/backups
> > pg_dumpall --globals-only > globals_127.sql
> > Zlvl="--compress=zstd"
> > Threads=4 # or whatever
> > for db in x, y, z; do
> >     pg_dump -p5432 -Fd $Zlvl -v --jobs=$Threads -f $db $db
> > done
> >
> > New system:
> > cd /path/to/backups
> > psql -af globals_127.sql
> > Zlvl="--compress=zstd"
> > Threads=4 # or whatever
> > for db in x, y, z; do
> >     ${pg18}/pg_restore -p5433 -v --jobs=$Threads --clean --create -Fd -d
> > postgres $db
> > done
>
> Good idea.
>
> Thanks,
>
> Rich
>
>
>

-- 
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!

Reply via email to