pg_dumpall | ssh username@server 'cat > alldb.sql'

154 Views Asked by At

Im trying to dump my local postgresql database to remote server but

pg_dumpall | ssh username@server 'cat > alldb.sql'

output

pg_dumpall: could not connect to database "template1": could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

Already tried

postgres=# psql -f alldb.sql postgres

no output

Also

postgres@iitians:/home/iitians$ psql -f alldb.sql postgres

but no output

0

There are 0 best solutions below