Odoo Help


"restore() takes at least 4 arguments (4 given)" error in restore Odoo 9 via web front end using curl cli

IGAM Muliarsa
on 10/3/16, 9:50 PM 919 views

I'm trying to restore Odoo 9 data and files via web front end, using curl cli but it was fail.
The command:

$ curl -F 'master_pwd=password' -F backup_file=@/home/user/test.zip -F 'copy=true' http://localhost:8069/web/database/restore    

Error Log /var/log/odoo/odoo-server.log:

2016-10-04 01:38:52,536 10048 INFO ? werkzeug: - - [04/Oct/2016 01:38:52] "POST /web/database/restore HTTP/1.1" 500 -2016-10-04 01:38:52,541 10048 ERROR ? werkzeug: Error on request:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 177, in run_wsgi    execute(self.server.app)  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 165, in execute    application_iter = app(environ, start_response)  File "/usr/lib/python2.7/dist-packages/openerp/service/server.py", line 246, in app    return self.app(e, s)  File "/usr/lib/python2.7/dist-packages/openerp/service/wsgi_server.py", line 184, in application    return application_unproxied(environ, start_response)  File "/usr/lib/python2.7/dist-packages/openerp/service/wsgi_server.py", line 170, in application_unproxied    result = handler(environ, start_response)  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 1495, in __call__    return self.dispatch(environ, start_response)  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 1469, in __call__    return self.app(environ, start_wrapped)  File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 588, in __call__    return self.app(environ, start_response)  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 1662, in dispatch    result = _dispatch_nodb()  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 1635, in _dispatch_nodb    result = request.dispatch()  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 845, in dispatch    r = self._call_function(**self.params)  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 322, in _call_function    return self.endpoint(*args, **kwargs)  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 964, in __call__    return self.method(*args, **kw)  File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 514, in response_wrap    response = f(*args, **kw)TypeError: restore() takes at least 4 arguments (4 given)

IGAM Muliarsa
On 10/3/16, 11:07 PM

I missed to give parameter name in curl. here is complete syntax:

$ curl -F 'master_pwd=password' -F backup_file=@/home/user/test.zip -F 'copy=true' -F 'name=dbname' http://localhost:8069/web/database/restore

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: 10/3/16, 9:50 PM
Seen: 919 times
Last updated: 11/27/17, 2:52 PM