problem backup/restore PSQL DB - Mailing list pgsql-admin

From JieJun Xu
Subject problem backup/restore PSQL DB
Date
Msg-id 75c69f690607241726r1a640b2excab3439485cdff63@mail.gmail.com
Whole thread Raw
Responses Re: problem backup/restore PSQL DB  (Paul S <plabrh1@gmail.com>)
List pgsql-admin
Hi all,
    I am trying to backup a psql database in one system(Debian), and restore it to another system(ubuntu) which has a fresh installed psql db.  However, I got the following errors. Can anyone give me some help on solving it. Many thanks.

-------------
 OME Restore
-------------

    \_ Extracting postgres database ome and checking archive version
/bin/tar  --preserve-permissions --same-owner --directory /tmp -xf 'ome_backup_2006-07-24.tar ' OMEmaint omeDB_backup    \_ Checking archive for OMEIS files
/bin/tar  -tf 'ome_backup_2006-07-24.tar' Files/lastFileID
    \_ Restoring postgress database ome
Checking database
Database ome (version 2.23) was found and it will be overwritten. Continue
? [y/n]: y
su postgres -c '/usr/bin/createuser --adduser --createdb  ome'
createuser: creation of new user failed: ERROR:  user "ome" already exists
su postgres -c '/usr/bin/createdb  -T template0 ome'
CREATE DATABASE
su postgres -c '/usr/bin/pg_restore  -O -d ome --use-set-session-authorization /tmp/omeDB_backup'
pg_restore: [archiver (db)] could not execute query: ERROR:  user "rajesh" does not exist

pgsql-admin by date:

Previous
From: Kevin Keith
Date:
Subject: Alter table set statistics with partitioned tables
Next
From: Paul S
Date:
Subject: Re: problem backup/restore PSQL DB