Re: Restore xxxxx.backup database

From: Richard Huxton <dev(at)archonet(dot)com>
To: adccs <adccs(at)tn(dot)gov(dot)in>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Restore xxxxx.backup database
Date: 2005-09-27 10:45:23
Message-ID: 433922C3.2040001@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

adccs wrote:
> Help needed to restore a backup database!
>
> 1. Postgres service was started. When I run a restore command for the
> backup stored in /tmp (backed from another server working on this
> database and sent to meby email by another user). I created a database
> by the same name "royapuram" by using createdb in template1 and then ran
> the following command:
>
> [root(at)adccs ~]# /usr/bin/pg_restore -a /tmp/royapuram.backup
> ERROR: pg_restore: [archiver] unsupported version (1.10) in file header

Do the versions for the two installations of PostgreSQL match? (Hint - I
think the answer will be "no").

> 2. Alternatively I used (after creating "royapuram" database
> [root(at)adccs ~]# su - postgres
> -bash-3.00$ psql royapuram < /tmp/royapuram.backup;
> RESULT
> ERROR: syntax error at or near "" at character 1
> and the whole terminal churns up junk characters and stops!

You can only do this with a text dump. The file you have is probably in
the "compressed" format.

Your user probably has a more recent version of PostgreSQL than you do,
so pg_restore can't understand the format of the backup file.

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sean Davis 2005-09-27 10:54:51 Re: Index use in BETWEEN statement...
Previous Message Frodo Larik 2005-09-27 10:20:05 Query Question