0

Are there known issues with moving a PostgreSQL database from osx to windows? I created a backup of my database and i want to use it to restore the database on a new machine. It works fine if i go from osx to osx but when i try to do it on osx to windows the tables don't show up after the restore. Does anyone know what the problem could be?

MBU
  • 113
  • 5

1 Answers1

3

Have you tried to backup by make a plain Text backup and transfer to the Windows machine ?

Try moving tha database in this way :

On OSX :

pg_dump -U postgres dbname > /home/user/dbname.psql

On Windows :

psql -U postgres
CREATE DATABASE dbname;
psal -U postgres dbname < C:\temp\dbname.psql

Warning : you must also replace the owner user of the database in the Windows new installation of postgres, because if you try to create the table on the new database through backup script with a owner user that doesn't exist on your destination database cluster you get an error, and the table can't be created.

aleroot
  • 3,180
  • 6
  • 29
  • 37