Forums

Postgresql troubles

Hello, just setup a pg for my account, several issues:

1) Tried to connect from external gui tool using ssh and instructions from a page I found where i used my PA credential for SSH, but connection is refused. Did someone manage to connect to pg from external tool ?

2) Tried to restore from console a dump I had with: pg_restore -U super -d mydb -1 /Users/ME/Downloads/20170126_092350.backup; Got error: ERROR: syntax error at or near "pg_restore" What is wront with my command ?

3) PG from PA is version 9.4.X, the backup is from 9.6.X. Is a restore even possible at all ?

Thanks, Ben

  1. If you're getting connection refused, you may be connecting to the wrong address or your network is preventing SSH connections from going out have a look here for debugging info.

  2. You're probably running it in the wrong kind of console. pg_restore should be run from a bash console.

  3. Probably. Unless you've used feature that are in 9.6 that are not in 9.4

Hi Glenn About 2:

You confirme i must run pg restore NOT from a postgres console but from a regular bash console?

What are pg console for then?

The pg console is for querying and managing your database.