0

I have a multi-gigabyte OSM server set up on a virtual server running through VMWare Fusion. I access this from my mac as if it were a remote server for my map making tasks. While the solution works, its a bit clunky, and I'd like to move it to a Postgres.app installation on my mac.

My question is how do I migrate this data from one machine to the other?

If I'm honest, the Postgres installation is a bit of a black box to me; I'm more of a MySQL guy. On MySQL, I would simply move the data directory, but this doesn't appear to be as easy with a Postgresql server, and I've yet to find a data dump script similar to what we enjoy with mysqldump.

Any advice would be much appreciated.

Thanks, Steve

sstringer
  • 486
  • 7
  • 12

1 Answers1

2

To copy postgres server you can:

1) Use pg_dump/pg_restore

2) Or just copy the data directory from one server to another (just be sure to stop server while you are moving and replacing data directory and start it afterwards). You may need [-D datadir] key for pg_ctl when starting server. It may not work if your postgres servers havi different versions or architecture.

Also your mac has another postgres database installed besides Postgres.app so check what binaries you are using when calling pg_dump, pg_restore, pg_ctl.

Ihor Romanchenko
  • 26,995
  • 8
  • 48
  • 44