I'm trying to generate a Python script to backup my database:
import xmlrpclib
sock = xmlrpclib.ServerProxy('http://localhost:8069/xmlrpc/common')
uid = sock.login('mydb', 'myuser', 'mypass')
sock = xmlrpclib.ServerProxy('http://localhost:8069/xmlrpc/db')
sock.dump('mydb')
Traceback (most recent call last)
....
Fault: <Fault AccessDenied: 'Access denied.'>
Is this possible?
I'm currently using the scripts dump_db.sh and housekeeping.sh as shown in this question: https://www.odoo.com/forum/help-1/question/how-to-setup-a-regular-postgresql-database-backup-4728 but I can't find a way to restore the database.
Thanks!
While managing database you do not require to use login method like uid = sock.login('mydb', 'myuser', 'mypass') dump method accepts 2arguements example .dump(super_user_password,urdatbase_name)