I often use postgres server,so sometimes I have to make testing environment for postgres in my windows pc.
So I want to write how to make testing environment about Postgres for my memo.
First Step
Please login postgres server, and then you have to change user what this user is postgres user.
And I use pg_dump.
1 |
# pg_dump -f filename.sql.gz -Z 1 -c database-name |
-f to write file about output.
-Z。。Number this is level of compression.
-c it is cleaning for schema.
Second Step
You get dump file from server.And then you decompress file.
Third Step
You install postgres in your windows PC. Please check Postgres sites.
Fourth Step
Please copy dump file to there.
1 |
Program FilesPostgresSQL8.3bin |
And please open command prompt and write this command.
1 2 3 4 5 6 7 8 9 10 11 |
cd Program FilesPostgresSQL8.3bin psql dbname That's all!!! And if you see these message.Please make user on for postgres. psql: FATAL: role "・譯シ・カフセ" does not exist、ネクタ、??ソ、饅r Or please change user what this user is postgres user. <pre>psql -u |