From: | John McKown <john(dot)archie(dot)mckown(at)gmail(dot)com> |
---|---|
To: | laveen tepan <laveentepan(at)gmail(dot)com> |
Cc: | pgsql-bugs <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: Help me for the Query |
Date: | 2018-02-27 13:21:41 |
Message-ID: | CAAJSdjipQ0gdydycvuBo0LpYPfPXU2c_JjHPGobr7YD1PxPrFQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Tue, Feb 27, 2018 at 6:39 AM, laveen tepan <laveentepan(at)gmail(dot)com> wrote:
> 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
> but i get the error so please help me in this
>
> "pg_restore --host "localhost" --port "5432" --username "postgres"
> --no-password --role "hellowallet" --dbname "Replica" --verbose "path of
> file "
>
>
> *The error is* *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
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Einspanjer | 2018-02-27 14:40:11 | Re: BUG #15085: Domain "not null" constraint doesn't detect a null returned from a resultset |
Previous Message | laveen tepan | 2018-02-27 12:39:48 | Help me for the Query |