문제

I've just purchased a new computer (mac OSX) and I want to continue developing using the same database I had on the old computer. I don't want it remotely done cause I dont want to keep the other computer on. I just want to copy the db and put it on this computer for development. I have a USB stick I can use but I'm not sure how to proceed. brew, rails, ruby, rvm, pg are all installed and configured.

도움이 되었습니까?

해결책

pg_dumpall ? To dump all databases:

$ pg_dumpall > db.out

To reload this database use, for example:

$ psql -f db.out postgres

I had to do it with -o option for the oids

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top