Question

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top