Reputation: 545
I have not made a backup from my old data directory, but I still have the directory in tact. In my current database I have the same Schema, etc... When I try to restore the database (using pgadmin III), I receive this error:
/Applications/pgAdmin3.app/Contents/SharedSupport/pg_restore --host localhost -- port 5432 -- username "postgres" --dbname "postgres" --role "postgres" --no-password --format directory --verbose "/Library/Postgres/9.5/data"
pg_restore: [directory archiver] could not open input file "/Library/PostgreSQL/9.5/data/toc.dat": No such file or directory
I am not sure where the toc.dat came into play, as I am not familiar with it. This is evidently halting the restore, but I do not know how to fix that issue.
Upvotes: 2
Views: 8984
Reputation: 1235
Using 3.0 version of pgAdmin 4
Might be too late, but this works for me all the time.
From the Current or Old database
Backup...
;filename
and make sure format
is set to Tar from the drop-down menu;Once the Backup file is saved
On the New or Other database(Or on a different machine)
Create a new database and right click on it once created, select Restore...
option and locate the Backup
up file created earlier. You might have to have select
Show hidden files and folders
option and setFormat
toAll Files
That error should not be experienced with this method.
Upvotes: 1