Help

Welcome!

This community is for professionals and enthusiasts of our products and services.
Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.

0

Command `pg_dump` not found

Avatar
Fadli

Dear All,

After I'm installing Odoo 8 from bitnami in windows 7 64 bit, I'll try to backup database for backup, so when I'm trying in development, If I need to database rollback like first installing, I can restore from the backup, In Odoo 9 before, I do like that, but when I'm trying Odoo 8 I have some problem, The originally after first installing, when I try to create backup from odoo gui, the database manager in web. I got error message "access denied" when I try to backup database bitnami_openerp. So, I try to find the solution in google link : Title.

In file C:/odoo/apps/odoo/conf/conf/openerp-server.conf, I change admin_passwd = YOUR_PASSWORD. Then restart the server. After that, the error "access denied" is gone, but I have new error one.. `pg_dump`. Like picture below :

Command-pg-dump-not-found
So for now, I'll try to backup manually from pg admin. But, if I'm backup from pg admin, there is need to backup all files in C:/odoo too?

Avatar
Discard
1 Answer
2
Avatar
David Tran
Best Answer

Odoo must know pg_dump path to do backup from its UI. In your case, Odoo probably did not know it. The solution is to declare pg_dump path in Odoo's configuration as below:

pg_path=/path/to/pg/binary

In Ubuntu, if you install Postgresql with "apt-get install" command, the path to binary should be /usr/lib/postgresql/9.4/bin/, then you can declare as below:
pg_path=/usr/lib/postgresql/9.4/bin/

You can find the exact path in your environment by command:
sudo find / -name pg_dump

Fadli wrote:
So for now, I'll try to backup manually from pg admin. But, if I'm backup from pg admin, there is need to backup all files in C:/odoo too?
In OpenERP 7, files (incl. filestore, custom apps from app store, sessions) are stored in /path/to/odoo_user_home_dir/.local/share/OpenERP
In Odoo 8 and the later, files are stored in /path/to/odoo_user_home_dir/.local/share/Odoo
Also, you can ask Odoo to store those thing in your preferred directory by specify data_dir directive in Odoo's configuration file, something like
data_dir = /your/preferred/path


Hope this helps…
2 Comments
Avatar
Discard
Avatar
ViindooBot
-

Thank You Dude,

After I read the hint from you combine other people cases [url]http://stackoverflow.com/questions/11460823/setting-windows-path-for-postgres-tools[/url], and I modified my system environment path in windows using my relative path odoo 8 installation, windows could locate my pg lib and bin directory, at least a can duplicate my databases, so I'll keep my original databases, and every step trial an exploring Odoo 8, I'll keep it backup firstly.

So now, its time to try harder understand Odoo 8. By the way, how to mark my posting in this thread as solved? It's enough just press "Accept Answer" button in people answer / suggestion?

Merci,
Fadli.

Avatar
David Tran
-

My recommendations: Don't deploy Odoo on Windows. Many nightmares would come later. Although Odoo can run on Windows, Mac OS, Linux, the recommended environment is Linux. I myself prefer Ubuntu, CentOS, RedHat.

The reason is that there are many powerful Python libraries just support Linux. In addition to that, many tutors/tips have been writing for Linux. Also, I love freedom that Linux can give.

And, thank you for your suggestion about "Solved Mark". I will raise this issue to our developer team to see if they can implement this soon.

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!