1
I've been created an Internet service on Debian server. I want to move all data from one server to a new one. So, how can I move the postresql database? What is the best pipeline?
1
I've been created an Internet service on Debian server. I want to move all data from one server to a new one. So, how can I move the postresql database? What is the best pipeline?
2
pg_dump -Fc
each database, and pg_dumpall --globals-only
the users, etc.
Run the dumpall script through psql
to restore it. Then pg_restore
each individual database dump.
0
My own answer: In my case in old machine:
pg_dumpall > all.tar
and than in the new machine:
sudo -u postgres psql < all.tar
helped to me.
pg_dump
andpg_restore
. – Craig Ringer – 2015-08-16T11:13:33.743