Thread: Migrating database from Unix to Windows
I am new to Postgresql and I am in the process of trying to migrate 2 databases from a unix box to windows 2000. Is there an easy way to export the database across platforms? If not, what is the best way to do this task? I wasn't sure if I could take a dump of the databases on the Unix box and rerun the sql scripts in Windows to recreate the databases. Any insight or assistance that you can offer would be greatly appreciated.
Also, I am using PostgreSQL8. Would I still need to use Cygwin since this release is supposed to work on a windows platform. Thanks in advance.
Rick Hackenberg
Business Systems Analyst
PRIMEDIA
Enthusiast Media
6405 Flank Drive
Harrisburg, PA 17112
717-540-6643(Office)
717-657-9552 (FAX)
717-215-0450(Cell)
I am new to Postgresql and I am in the process of trying to migrate 2 databases from a unix box to windows 2000. Is there an easy way to export the database across platforms? If not, what is the best way to do this task? I wasn't sure if I could take a dump of the databases on the Unix box and rerun the sql scripts in Windows to recreate the databases. Any insight or assistance that you can offer would be greatly appreciated.
Also, I am using PostgreSQL8. Would I still need to use Cygwin since this release is supposed to work on a windows platform. Thanks in advance.
Rick Hackenberg
Rick, welcome to PGSQL. there is a tutorial about how to set up PGSQL 8 on a windows box here...
http://www.geocities.com/operationsengineer1/
you don't need cygwin.
some folks with more experience will answer you in more detail, but i think you should be fine restoring a dump of the unix db and restoring it on windows.
good luck - and i hope you like PGSQL.
oe1
> I am new to Postgresql and I am in the process of trying to migrate 2 > databases from a unix box to windows 2000. Is there an easy way to > export the database across platforms? If not, what is the best way to do > this task? I wasn't sure if I could take a dump of the databases on the > Unix box and rerun the sql scripts in Windows to recreate the databases. > Any insight or assistance that you can offer would be greatly > appreciated. > > Also, I am using PostgreSQL8. Would I still need to use Cygwin since > this release is supposed to work on a windows platform. Thanks in > advance. Since pg_dumpall create a back-up of the entire DB cluster in to a standard text based PostgreSQL/SQL format, the restore is completely platform independent. If there are problems, (such as missing PL-languages on the destination server) these would be migration problems independent of OS. I am not sure what is possible with binary copies of the data directories. I recall an email to one of the postgresql lists about a year-ago where someone was attempting to use the same data directory on a dual-boot linux/windows computer. However, I do not recall if he had any success. My guess is that this is not a recommended practice for a production server. But a binary copy may be possible, but perhaps not recommended. Regards, Richard Broersma Jr.
Hackenberg, Rick wrote: > > I am new to Postgresql and I am in the process of trying to migrate 2 > databases from a unix box to windows 2000. Is there an easy way to > export the database across platforms? If not, what is the best way to > do this task? I wasn't sure if I could take a dump of the databases on > the Unix box and rerun the sql scripts in Windows to recreate the > databases. Any insight or assistance that you can offer would be > greatly appreciated. > > Also, I am using PostgreSQL8. Would I still need to use Cygwin since > this release is supposed to work on a windows platform. Thanks in > advance. > There is a binary installer for windows (at least XP, don't know about windows 2000, but would be easy enough to look on the website). The dumps of a database are generally cross-platform, I think. I don't know that you will need to do anything special. What have you tried? Sean
On Thu, Oct 19, 2006 at 06:51:36PM -0400, Sean Davis wrote: > There is a binary installer for windows (at least XP, don't know about > windows 2000, but would be easy enough to look on the website). The > dumps of a database are generally cross-platform, I think. I don't know > that you will need to do anything special. What have you tried? Dumps are completely platform agnostic. The files in $PGDATA are not. If you're dual-booting between Windows and Linux, you might be able to use the same data directory on both, but I wouldn't bet on it. I certainly wouldn't do anything like that in production. -- Jim Nasby jim@nasby.net EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)