Odoo Help


How to authenticate user while taking database backup using XMLRPC?

Anil R. Kesariya
on 4/8/15, 10:16 PM 1,435 views

Hello Everyone,

I have sample script which take dump backup using XMLRPC, This script works well with intra-network(Internal network), but having Access denied Error while applying on inter-network.

Here is my script


import base64 import xmlrpclib sock = xmlrpclib.ServerProxy('http://serverip:8888/xmlrpc/db') #Real public IP all_database = sock.list() for database in all_database: file_path = "/home/serpentcs/backup/" #Give path of folder where backup file will be store file_path += database file_path += ".dump" backup_db_file = open(file_path, 'wb') backup_db_file.write(base64.b64decode(sock.dump('admin', database))) #admin is master password in my case backup_db_file.close()


Does anybody has idea about this? help will be appreciated.

Thanks & Regards,


Hi Anil,

Have you solved this?

on 9/30/16, 9:09 AM

Openies Services

--Openies Services--
| 2 2 4
Vadodara, India
--Openies Services--

We provide Odoo Services.

Contact us on : contact@openies.com

Openies Services
On 4/9/15, 3:11 AM


Try "Port Forwarding" on client server. - is your private IP address on the LAN. That might be a case of IP change. 

contact your system admin and tell them to forward port. 

Very good article with pictures is here: How to Forward Ports on Your Router.

You don't understand my question, I don't have problem with IP address, in example i have just added dummy IP, using that example with Public IP have authentication problem.

Anil R. Kesariya
on 4/9/15, 5:23 AM

@Openies : Thanks for the best link of IP forwarding, In I am using the Public IP, for the security reason I can not display on example that why I have just add sample IP. Just try this script with your any of your live server and see what is the problem I am facing.

Anil R. Kesariya
on 4/9/15, 10:26 AM

Solanki Shamji

--Solanki Shamji--

| 5 2 7
Baroda, India
--Solanki Shamji--


Solanki Shamji
On 4/9/15, 2:37 AM

Hello Anil,

I think problem is due to private IP. Private IP is only access within local area network. 

So try after make your IP as public IP. 

May be this will helpful you.



@Shyam : The IP I am using for execute this script is already public static IP. its need some authentication to access that system. Which is accessible via inter network world from browser.

Anil R. Kesariya
on 4/9/15, 2:56 AM

Its not public. I cant access.

Solanki Shamji
on 4/9/15, 3:02 AM

@shyam: I appreciate your answer, But I don't have any problem regarding IP address. You don't understand my question properly. Read twice and think.

Anil R. Kesariya
on 4/9/15, 8:39 AM

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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 4/8/15, 10:16 PM
Seen: 1435 times
Last updated: 12/5/17, 10:30 PM