Odoo Help

Welcome!

This community 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.

0

Database specific Master password - does it exist?

By
Dale
on 3/13/14, 8:30 AM 3,517 views

Hi

I am having a little trouble managing my databases. I have 2. I am trying to backup the live one but I keep getting and "Access denied" error. I have the current admin password to manage databases. I can create a new database and I can change the password but I cannot backup this database. I know for a fact that the current password to manage databases is NOT the one that was used when this database was created. It was changed from the original one as it was illogical and didn't fit our name conventions. Is it so that databases can only be managed using their original creation passwords and not using the existing database admin password?

If so, how can I find what password was used to create this database? If not, what else could be denying me access?

Thanks

I have done a little more searching and have found that the above does seem to be the case. Thanks Martin Bramwell for this explanation http://help.openerp.com/question/478/what-difference-is-there-between-the-admin-and-master-pass/#487. My Question is now, I do have access to Postgres on this server, where can I see the database password or how can i safely change it? Thanks

Dale
on 3/13/14, 8:44 AM

This behaviour can be caused by having odoo 8 installed on one application server and Postgres 9.3 on another, as database server (9.3) and your local pg_dump (9.1) mismatch. Odoo will report a different error, something like you need to set .pgpass ... But, if you run the pg_dump command manually from the application server you will get the correct error. If you look at the db.py code you will see that the server is executing the same command in the background when trying to backup your database. You can ether upgrade pg_dump - this means installing posgres 9.3 on application server (not to use as a database, just the pg_dump) or running the backup command manually on database server.

Martin Pishpecki
on 11/12/14, 3:44 AM
1

Ray Carnes

--Ray Carnes--
15717
| 9 7 9
Greater Los Angeles, United States
--Ray Carnes--

Senior Odoo Analyst

OpenERP 6.1, 7.0 and Odoo 8.0, 9.0 (Since 2012)

Completed Functional and Technical Training.

Major Skills:

  • Needs Discovery and Requirements Analysis;

  • Function and Technical Specifications;

  • Project Planning;

  • Prototyping and Proof of concepts;

  • Data migration;

  • Configuration & Customization (UI and modules);

  • Integration - data, business logic and service levels;

  • Training and Knowledge transfer;

  • Go Live support;

  • Help desk;

  • Version Migration.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

Ray Carnes
On 3/16/14, 4:19 AM

No.

  • It is not the case that there is a 'database' password.

  • It is not the case that a database somehow has knowledge of the password used to create it or required to back it up.

There are just USER passwords, or SYSTEM passwords.


Generic, unaltered PostgreSQL function calls are made for all database operations, including backup and restore.

Backup:

pg_dump --format=c --no-owner --username=<> --host=<> --port=<> <dbname>

Restore:

pg_restore --no-owner --dbname=<>

Note: on Windows, credentials are supplied via environment variables and/or additional files.


Verify this for yourself in the code at

http://bazaar.launchpad.net/~openerp/openobject-server/7.0/view/head:/openerp/service/web_services.py#L265


There is one MASTER SYSTEM password, set in the OpenERP configuration file (something like /etc/openerp-server.conf but can be changed) or on the command line via admin_passwd=. It can also be changed via the UI, and in this case is stored in a resource file called .openerp_serverrc in the home directory of the user running the service.


Other passwords OpenERP uses:

1) SYSTEM: db_password - if a specific password is setup for OpenERP to log into PostgreSQL for administrative purposes.

2) USER: database specific passwords, created within each database.


TIP - If you can create databases but not back them up, try killing any idle PostgreSQL connections.


Thanks Ray for that very insightful feedback. In fact this is a windows environment and I am attempting to back up the database so that we can migrate to Linux. I think by your comment you seem to have suspected that. Any idea what the environment variables or or other files you speak of may be? Interestingly enough I can log into Postgres and do a manual backup of this database. Would that be sufficient for my migration to Linux or does the backup from the OpenERP interface include any additional data?

Dale
on 3/17/14, 2:43 AM

Sorry - I thought I was clear - the backup OpenERP performs is a PostgreSQL backup - I've posted the exact command line syntax for it.

Bista Solutions US, Ray Carnes
on 3/19/14, 1:27 AM

Thanks for your advice Ray. It was really useful to me. How do I give you credit for this?

Dale
on 4/3/14, 7:41 AM

Thanks for your advice Ray. It was really useful to me. How do I give you credit for this?

Dale
on 4/3/14, 7:46 AM

At the top left corner of the answer I gave, you can click the up arrow to 'vote' for the answer to indicate it helped you. Please do this for any answer on the site you find helpful.

Bista Solutions US, Ray Carnes
on 4/3/14, 2:59 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 3/13/14, 8:30 AM
Seen: 3517 times
Last updated: 3/16/15, 8:10 AM