0

I have my dump file of DB Dump via psql, I want to import it to my windows Postgres via PSQL from a certain location. However when I try the following:

postgres-# psql cds < C:\Users\user\Desktop\cds_db.bak

I get the following error:

Invalid command \Users. Try \? for help.

I also tried the following:

 postgres-# psql cds < cds_db.bak

But it was quiet, nothing happened.

The file is located on my desktop, how can I import the file?

melpomene
  • 84,125
  • 8
  • 85
  • 148
H Dindi
  • 1,484
  • 6
  • 39
  • 68
  • What are you typing your commands into? – melpomene Oct 21 '17 at 06:27
  • Perhaps this will help [psql \i : how to execute script in a given path](https://stackoverflow.com/questions/129445/postgresql-psql-i-how-to-execute-script-in-a-given-path#129496). See also [psql — PostgreSQL interactive terminal](https://www.postgresql.org/docs/current/static/app-psql.html) search for "\i" – jq170727 Oct 21 '17 at 06:36
  • 1
    When you see the `postgres-#` prompt you already started the command line tool `psql` - and `psql` is not a SQL statement you can use inside `psql`. Just use the `\i` command that is specific to `psql` –  Oct 21 '17 at 08:43

0 Answers0