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 have created that script to connect with the odoo database using erp peek i want to dump that database to my local machine .. the script is below
SERVER = 'http://localhost:8069'
client = erppeek.Client(server=SERVER)
print "connection success"
dump_dir = '/var/lib/postgresql/9.3/main'
db_username = ['admin']
db_names = ['ErpPeekDemoDatabase']
for db_name in db_names:
dumper = " -U %s --password -Z 9 -f %s -F c %s "
bkp_file = '%s_%s.sql' % (db_name, time.strftime('%Y%m%d_%H_%M_%S'))
file_path = os.path.join(dump_dir, bkp_file)
command = 'pg_dump' + dumper % (db_username, file_path, db_name)
subprocess.call('gzip ' + file_path, shell=True)
print "backup success"
print "Couldn't backup database" % (db_name)
i got this error
pg_dump: [archiver (db)] connection to database "ErpPeekDemoDatabase" failed: FATAL: Peer authentication failed for user "[admin]"
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: 6/15/16, 6:29 AM|
|Seen: 1179 times|
|Last updated: 6/21/16, 6:44 AM|