pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jean-Yves NOLEN <jynolen@gmail.com>
To: pgsql-admin@postgresql.org
Subject: Problems while restoring databases
Date: Mon, 12 Dec 2011 12:32:10 +0100
Message-ID: <00ff01ccb8c1$b19f2e60$14dd8b20$@gmail.com> (raw)

Hi everyone !

 

I am facing a problem after a lot of research has not found a solution.
I hope some of you can enlighten me
I will hold my position in 3 part: what I want, what I run, which is a
problem.

 

First of all I want to:


Back up a database with all information (structure, data, functions,
triggers) in a "dump"
Restore the same data (structure, data, trigger, etc ...) into a new
database with a different name (ex: src=foo ;  dst= bar)

 

So far not rocket science.

 

Then what I do:
pg_dump -i -F c -i -h ***.***.***.***  -p #### -U #### -f  c:\dump.bak
mySourceBase

 

A creation of new base like this :

CREATE DATABASE "testingBackup"

  WITH OWNER = postgres

       ENCODING = 'UTF8'

       TABLESPACE = pg_default

       LC_COLLATE = 'French_France.1252'

       LC_CTYPE = 'French_France.1252'

       CONNECTION LIMIT = -1;

And finally :

pg_restore -F c  -h ##### -p #### -U #### -d testingBackup C:\dump.bak

 

What problems i got 

pg_restore: [archiver (db)] Error while PROCESSING TOC:

pg_restore: [archiver (db)] Error from TOC entry 626; 2612 16386 PROCEDURAL
LANG

UAGE plpgsql postgres

pg_restore: [archiver (db)] could not execute query: ERREUR:  language
"plpgsql" already exists

    Command was:

CREATE PROCEDURAL LANGUAGE plpgsql;

WARNING: errors ignored on restore: 1

 

In fact there is no problem since all data is restored but in a goal of
"cleanliness" I want to clean this mess and finally get no error.
To this end I am open to your suggestions.

Thank you in advance for your help, and I apologies for my bad English.

 

Jean-Yves

view thread (2+ messages)  latest in thread

Message-ID: <00ff01ccb8c1$b19f2e60$14dd8b20$@gmail.com>
Permalink:  ../00ff01ccb8c1$b19f2e60$14dd8b20$@gmail.com/
Also on:    postgresql.org/message-id/00ff01ccb8c1$b19f2e60$14dd8b20$@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: jynolen@gmail.com
  Subject: Re: Problems while restoring databases
  In-Reply-To: <00ff01ccb8c1$b19f2e60$14dd8b20$@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox