Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I am trying to dump a postgres database in Linux and then restore it in Windows. However, when I use the following command:

pg_dump -F p tempDB > tempDB.dump.out

The created file will not be usable in Windows. In fact, when I log into Windows I cannot see the file there! Then when I log in in Linux I notice the tempDB.dump.out file does not exist there either anymore. This is however, when I use the above command, tempDB.dump.out has a size about 400MB.

Am I doing something wrong?

Thank you in advance

share|improve this question
1  
when I log into Windows I cannot see the file there... where is there? Where are you putting the file? –  lurker Sep 18 '14 at 13:11
    
Windows doesn't have access to where I initially save the backup file. Therefore, I copy the file in a folder that is accessible in Windows. However, when I log into Windows the folder where I copied the file is empty! Then when I log into Linux the folder is also empty there! –  Amir Sep 18 '14 at 13:30
    
That's a file system or file system sharing issue, not a database issue. Is this a Linux /tmp folder? Are you using samba then for file shares? What if you create any other file in that share (like a simple txt file), can you see it in Windows? –  lurker Sep 18 '14 at 13:34
    
Once you have your file-sharing problems sorted, use -Fc for the custom format. It's quicker to restore and more flexible. –  Richard Huxton Sep 18 '14 at 13:58
    
I could finally resolve this issue. The issue was caused by a software I had installed on Linux. Can anyone give me a hint for restoring the dataset in postgreSQL in Windows? –  Amir Sep 18 '14 at 16:50

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.