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?
Asked
Active
Viewed 330 times
0
-
1What do you mean by "the tables don't show up after the restore" ? Use plain-text SQL dump (pg_dump) and describe what/where/when fails. – Grzegorz Szpetkowski Jun 02 '11 at 04:34
1 Answers
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