1
votes

In reference to this question:

PostgreSQL Job Scheduling: Creating Schedule Backup using Bat File

It made me successful to have a back-up for my database.

Filename: Database_backup.backup

However, using PgAdmin III using Restore selection, i wasn't able to restore it, it shows Error:

C:\Program Files\PostgreSQL\9.4\bin\pg_restore.exe --host localhost --port 5432 --username "postgres" --dbname "db_name" --no-password --list "C:\Users\Name\Documents\Backup_20160805.backup" pg_restore: [archiver] input file appears to be a text format dump. Please use psql.

What I am missing here?

Is it in Backup?

Again, I need your guidance here.

Thanks so much.


1

1 Answers

1
votes

pg_dump, which is called by pgAdmin III to perform backups, can create them in four formats:

  • plain: SQL commands
  • custom: compressed proprietary binary format
  • directory: one backup file per table
  • tar: like "directory", but as a tar archive

There is a "format" dropdown in pgAdmin III that lets you select the format.

To restore a plain format dump, you'll have to execute the SQL script with pgAdmin III or psql.

For the other three formats, you use pg_restore, which is internally called by pgAdmin III's "restore" functionality.

So you took a plain format dump, which causes the reported error with pg_restore. Execute it as a SQL script instead!