Search code examples
postgresqlpgadminpg-dumppg-restore

pg_restore cant find the input file "X" no such directory or file


first off im relatively new to pgadmin and postgresql

so i have a backup done with pgadmin in plain text which dumps the data i need from one table into a file called lodging. it came from a plans_to_lodge table from our live server. now to test a new web application front end i want to pg_restore it but this is what i get

> pg_restore -h localhost  -d TestingDatabase2 -t lodging_of_plans -n plan_authentication "C:\lodging"
pg_restore: [archiver] could not open input file "C:\lodging": No such file or directory

the documentation doesnt give an example for a table restore and yes the file is at that location in the C drive


Solution

  • The issue was it being the root folder, so when i put the file named lodging into another folder like so

    C:\folder\lodging
    

    it worked now onto more errors