Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I installed a fresh Odoo and created a DataBase, installed all modules I need and made the admin an admin.
Now I want to duplicate this db, but I always get "Database is being accessed by other users".
How can I duplicate a database with the database manager GUI of odoo?
If I stop odoo service the simple line of sql does the job:
CREATE DATABASE whatever_db WITH TEMPLATE base_deb OWNER db_owner;
If it isn't possible without entering a console, what use does this function have at all?
This is due to postgres keeping track of the connections, even if they are not closed correctly (just killing the browser for example). Probably the thing to do is restart Odoo. Right after that, the connections should be gone and you should be able to duplicate.
For some mysterious reason it sometimes works over here after pressing the button multiple times. I am clueless as to why that is.
By the way, the client-dump of the database is not always fool-proof we have found out. I still rely on the pg_dump, if only to ensure the type of dump and the other options such as the no-owner flag. Furthermore, when using legacy postgres to update to a new postgres, the client will not do the job correctly.
That is a good question and I guess there's no answer for that, no answer like you want.
Like you want, only wait for Oddo disconnect from db and after you can do database operations.
After some time testing and using Odoo, I think the "database manager" feature needs more work.
I can only do database operations after use SQL query to postgresql disconnect any user from specific database which I'll work.
Here the query useful sometimes, to kill connections:
WHERE pg_stat_activity.datname = 'database_name'
AND pid <> pg_backend_pid();
Change 'database_name' for your needs and all connections to db will be closed.
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 10/14/14, 7:43 AM|
|Seen: 3414 times|
|Last updated: 3/16/15, 8:10 AM|