How to transfer postgresSQL data from Windows XP (higher version) to Ubuntu (lower version)

In this case the pgAdmin in my Xp is 1.11 and in Ubuntu is 1.8.2, that means I can not do it through backup and restore. if you use it, you may get some error like versino does not match: [archive]unsupported version (1.11) in file header.
So I have to use pg_dump command:
In WIndows XP:
in the command window type in:


c:\Program Files\PostgreSQL\8.4\bin\pg_dump -U table_name DATABASE_name > backup_file_path_and_name;

Type in user password when needed
In Ubuntu:
Locate the psql command, usually it will be in the following directory: in /usr/bin:
Type in the following command in terminal:

cd /usr/bin;
psql -f backup_file_path_and_name DATABASE_name;


waiting for the process to finish.

No comments:

Post a Comment

Datatable static image not found on the server

When you use ```datatables.min.css``` and ```datatables.min.js``` locally, instead of datatables CDN, you may have encountered that ```sort...