% pg_dump dbname | gzip > filename.dump.gz

reload it with

% createdb dbname
% gunzip -c filename.dump.gz | psql dbname

Tom Veldhouse
veldy at veldy.net

----- Original Message -----
From: Timothy Wilson <wilson at visi.com>
To: TCLUG <tclug-list at mn-linux.org>
Sent: Tuesday, August 22, 2000 11:39 PM
Subject: [TCLUG:20610] moving PostgreSQL table


> Hey everyone,
>
> I'm migrating a very simple PostgreSQL database from one machine to
another
> and I can't figure out the proper procedure. I scanned a bunch of the
docs,
> but I can't find anything that says, "Hey, idiot, here's how you move a
> database from one machine to another!"
>
> Can I simply tar up the files in the existing 'foo_db' directory and move
> them to the new machine and untar in the appropriate place?
>
> -Tim
>
> --
> Tim Wilson      | Visit Sibley online:         | Check out:
> Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/
> W. St. Paul, MN |                              | http://slashdot.org/
> wilson at visi.com |   <dtml-var pithy_quote>     | http://linux.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tclug-list-unsubscribe at mn-linux.org
> For additional commands, e-mail: tclug-list-help at mn-linux.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tclug-list-unsubscribe at mn-linux.org
For additional commands, e-mail: tclug-list-help at mn-linux.org