Moving a PostgreSQL database from one server to another

Edward Croft ecroft at OPENRATINGS.com
Thu Jan 13 18:36:26 UTC 2005


On Thu, 2005-01-13 at 11:28 -0600, Rodolfo J. Paiz wrote:
> <SNIP>
> I guess I need a backup/restore or an export/import... but for some
> bizarre reason I haven't found them yet. Admittedly I've only been
> looking for about an hour (and I keep getting sidetracked learning other
> stuff), but I thought I'd send a quick email to the One True List to see
> if anyone can save me some time, since I'm on a deadline.
> 
> Thanks, y'all...
> 
> -- 
> Rodolfo J. Paiz <rpaiz at simpaticus.com>
> 
I do this all the time. Postgres stores its data files
in /var/lib/pgsql/data by default. Stop the server on your laptop. This
will close the files. You can then copy that whole directory over. As
long as you install into the same directory, you should be able to just
restart postgres. You may need to make changes to the pg_hba.conf and
pg_ident.conf. 

-- 
Edward M. Croft
Sr. Systems Engineer
Open Ratings, Inc.
200 West Street
Waltham, MA 02451-1121




More information about the users mailing list