Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Jun 2 '11 at 5:53

This question came from our site for professional and enthusiast programmers.

1  
What 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 2 '11 at 4:34
add comment

1 Answer

up vote 3 down vote accepted

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.

share|improve this answer
    
THANK YOU!!!!!! –  MBU Jun 2 '11 at 19:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.