Skip to Content
Menu
This question has been flagged
2 Replies
5367 Views

I have a database issued of PostgreSQL 'database.backup' (700 Mo), I want to use it in odoo 8. I've tried this:

     -1 I've created a new database in PGadminIII and I restored 'database.backup'  directly, but it didnt appear in odoo interface so I can select it.

     -2 I've created a new database in odoo (in the interface, database manager), and I've restored 'database.backup' in PGadminIII. but I've encountered a problem, when I want to install a new module this error appears:

'Integrity Error The operation cannot be completed, probably due to the following: - deletion: you may be trying to delete a record while other records still reference it- creation/update: a mandatory field is not correctly set [object with reference: Users - res.users]' 

     -3 I've tried to restore 'database.backup' directly from odoo (database manager/restore), once again an error has occurred:

'Impossible de restaurer la base de données'  wich means 'Impossible to restore the database'

Please help me, thanks in advance.

 

Avatar
Discard
Author Best Answer

I found what was the problem, I made 2 mistakes:

-The 1st was to not give the same name to the new database created as the name of the file 

-The 2nd was to not select the owner of the new database, it should be the same as the configuration of odoo, in my case 'openerp'.

So to restore a database in odoo, you can follow this steps:

     -Create a new database in postgreSQL and give it the same name as the file's name (file name = 'database.backup', new  database base name = 'database').

     -Select the owner of this new database so it is the same as the configuration of odoo.

     -Refresh the web browser, and select your restored database.

I know that my mistakes are basic, but i Hope that this will help in the future =). And thanks for the replay Xavier Brochard.

Avatar
Discard
Best Answer

What did you use to make the backup ?

Assuming it was done through Postgresql utilities, you should be able to restore it on a copy of the original database. Go on Odoo's Database Manager, duplicate the original database, then restore the backup through Postgresql.

Avatar
Discard