Thread: Q: migrating from serverA(gentoo) to serverB(centos) 8.2.4

Q: migrating from serverA(gentoo) to serverB(centos) 8.2.4

From
Ow Mun Heng
Date:
What's the best method for migrating data from my laptop to the final
server DB?

The data currently in my laptop is using SQL_ASCII encoding and the
deployment target is defaulted to using UTF-8. (should not be a concern
as the encoding should be handled via the dump right?)

However a concern would be that in my laptop, due to space consideration
etc, I have 3 tablespaces, dbspace2,dpspace3 and default. In the dump
(I did a
pg_dump -Upostgres hmxmms | ssh user@server "cat > /tmp/pgdatadump" )

I've tried to use pg_dump dbname | psql -h otherserver dbname but I keep
getting a connection refused w/ a statement saying that the server DB
may be allowing connections. (I can connect dine using psql -h
otherserver dbname fine w/o the pipe)