Thread: Help me for the Query
I get a dump database which is created by the use of pg_dump command on Postgresql 9.3 and i am using Postgresql 10
By using pg_restore i am trying to recover the data "pg_restore --host "localhost" --port "5432" --username "postgres" --no-password --role "hellowallet" --dbname "Replica" --verbose "path of file "
pg_restore: [archiver] input file does not appear to be a valid archive
The error isbut i get the error so please help me in thisI get a dump database which is created by the use of pg_dump command on Postgresql 9.3 and i am using Postgresql 10By using pg_restore i am trying to recover the data
"pg_restore --host "localhost" --port "5432" --username "postgres" --no-password --role "hellowallet" --dbname "Replica" --verbose "path of file "
pg_restore: [archiver] input file does not appear to be a valid archive
Could you show us the "pg_dump" that you used to create the file which pg_restore is failing upon. Please note from the "man" page: pg_restore is a utility for restoring a PostgreSQL database from an archive created by pg_dump(1) in one of the non-plain-text formats.
If you simply do a "pg_dump" with no operands, this creates a "plain text" format dump. As an example, on my system, the first few lines dumped by pg_dump look like:
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.10
-- Dumped by pg_dump version 9.5.10
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;
--
-- Name: node; Type: SCHEMA; Schema: -; Owner: joarmc
--
CREATE SCHEMA node;
ALTER SCHEMA node OWNER TO joarmc;
If this is what your file data looks like, then you can simply use "psql" to reload it.
psql <pg_dump.file.name
I have a theory that it's impossible to prove anything, but I can't prove it.
Maranatha! <><
John McKown
John McKown