I'm somewhat new to postgres and having trouble with restoring a local database with backup data using pg_restore and hoping to get some help. My situation is as follows:
- I have postgres running on Docker and I can access pgadmin.
- I have created a new server in pgadmin called 'flocal' with host name
postgres_dbuser namepostgresand port5432. - In this new server, I have created a new database called
fdb - I have a backup folder called
fprodon my local PC (mac if it matters) that contains a bunch of.dat.gzfiles inside.
Now I navigate to this backup folder and in my local terminal I run this:
pg_restore -h postgres_db -p 5432 -U postgres -d fdb -f fprod And I get the following error message below. I've tried changing my hostname to just -h localhost but no difference.
pg_restore: error: options -d/--dbname and -f/--file cannot be used together What am I missing and doing wrong? Please advise.