0

I've been trying to migrate my old openerp server installation to a new VPS so I tried to migrate the database.

I need to do it via shell because of the size of the database and unstable connection.

What I've done is log in server1 and then

su postgres
pg_dump dbname > db.dump

then I transfered the file to the new server and restored it like this

createdb dbname
psql dbname < db.dump 

the database itself was restored and I can browse through the tables if I want to but when I try to get in OpenERP the database is not available in the select box where the databases are. If I create new databases by using the openerp interface they appear correctly in the select box and I can connect.

I tried to create the db with UTF8 encoding and using template1 as well but nothing was different. I also tried to create the database via the interface, drop the tables and restore the backup but this gives errors after I log in like "product.product relation does not exist".

Any ideas what else I could try? Thanks in advance.

gabtzi
  • 573
  • 3
  • 8
  • 24

1 Answers1

0

When restoring the database take care to restore it with the correct ownership.

You may want to take a look at this question

Community
  • 1
  • 1
Andrei Boyanov
  • 2,309
  • 15
  • 18
  • Hi Andrei, I found it yesterday but couldn't answer the question due to time limits. It was indeed a problem with ownership. After changing the database owner it instantly got recognized. For the record the command I executed was "ALTER DATABASE dbname OWNER TO openerp" in case someone else is searching. Thank you very much again – gabtzi Feb 06 '14 at 07:41