Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
11895 Tampilan

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

Avatar
Buang
Penulis

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

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.

Jawaban Terbai

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.


Avatar
Buang
Penulis

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?

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

Penulis

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

Penulis

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

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.

comand line admin_passwd= doesn't seem to exist in Odoo 11

Post Terkait Replies Tampilan Aktivitas
0
Okt 24
695
13
Sep 24
189935
3
Mar 15
8711
3
Mar 15
10281
1
Mar 15
5394