Community mailing list archives

community@mail.odoo.com

Odoo - 8.0 : error while restoring db to local machine

by
Devang Pipaliya
- 07/30/2015 06:53:22
Hello community,

I have noticed since last few days that whenever I tried to restore any database that is of dump file type,
after few minutes is says error like this
```
2015-07-30 09:35:24,402 17046 ERROR None openerp.http: Postgres subprocess ('/usr/bin/pg_restore', '--username=odoo', u'--dbname=any_db', '--no-owner', '/tmp/tmp6Xt1w_') error 1
Traceback (most recent call last):
  File "/home/odoo/project/odoo/8/odoo_8/openerp/http.py", line 115, in dispatch_rpc
    result = dispatch(method, params)
  File "/home/odoo/project/odoo/8/odoo_8/openerp/service/db.py", line 73, in dispatch
    return fn(*params)
  File "/home/odoo/project/odoo/8/odoo_8/openerp/service/db.py", line 217, in exp_restore
    restore_db(db_name, data_file.name, copy=copy)
  File "/home/odoo/project/odoo/8/odoo_8/openerp/service/db.py", line 260, in restore_db
    if openerp.tools.exec_pg_command(pg_cmd, *pg_args):
  File "/home/odoo/project/odoo/8/odoo_8/openerp/tools/misc.py", line 128, in exec_pg_command
    raise Exception('Postgres subprocess %s error %s' % (args2, rc))
Exception: Postgres subprocess ('/usr/bin/pg_restore', '--username=odoo', u'--dbname=any_db', '--no-owner', '/tmp/tmp6Xt1w_') error 1
2015-07-30 09:35:24,480 17046 INFO None werkzeug: 202.131.111.126 - - [30/Jul/2015 09:35:24] "POST /web/database/restore HTTP/1.1" 500 -
2015-07-30 09:35:24,539 17046 ERROR None 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 "/home/odoo/project/odoo/8/odoo_8/openerp/service/server.py", line 290, in app
    return self.app(e, s)
  File "/home/odoo/project/odoo/8/odoo_8/openerp/service/wsgi_server.py", line 216, in application
    return application_unproxied(environ, start_response)
  File "/home/odoo/project/odoo/8/odoo_8/openerp/service/wsgi_server.py", line 202, in application_unproxied
    result = handler(environ, start_response)
  File "/home/odoo/project/odoo/8/odoo_8/openerp/http.py", line 1290, in __call__
    return self.dispatch(environ, start_response)
  File "/home/odoo/project/odoo/8/odoo_8/openerp/http.py", line 1264, in __call__
    return self.app(environ, start_wrapped)
  File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 579, in __call__
    return self.app(environ, start_response)
  File "/home/odoo/project/odoo/8/odoo_8/openerp/http.py", line 1264, in __call__
    return self.app(environ, start_wrapped)
  File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 579, in __call__
    return self.app(environ, start_response)
  File "/home/odoo/project/odoo/8/odoo_8/openerp/http.py", line 1264, in __call__
    return self.app(environ, start_wrapped)
  File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 579, in __call__
    return self.app(environ, start_response)
  File "/home/odoo/project/odoo/8/odoo_8/openerp/http.py", line 1438, in dispatch
    result = _dispatch_nodb()
  File "/home/odoo/project/odoo/8/odoo_8/openerp/http.py", line 1417, in _dispatch_nodb
    result = request.dispatch()
  File "/home/odoo/project/odoo/8/odoo_8/openerp/http.py", line 684, in dispatch
    r = self._call_function(**self.params)
  File "/home/odoo/project/odoo/8/odoo_8/openerp/http.py", line 311, in _call_function
    return self.endpoint(*args, **kwargs)
  File "/home/odoo/project/odoo/8/odoo_8/openerp/http.py", line 803, in __call__
    return self.method(*args, **kw)
  File "/home/odoo/project/odoo/8/odoo_8/openerp/http.py", line 403, in response_wrap
    response = f(*args, **kw)
  File "/home/odoo/project/odoo/8/odoo_8/addons/web/controllers/main.py", line 758, in restore
    request.session.proxy("db").restore(restore_pwd, new_db, data, copy)
  File "/home/odoo/project/odoo/8/odoo_8/openerp/http.py", line 879, in proxy_method
    result = dispatch_rpc(self.service_name, method, args)
  File "/home/odoo/project/odoo/8/odoo_8/openerp/http.py", line 115, in dispatch_rpc
    result = dispatch(method, params)
  File "/home/odoo/project/odoo/8/odoo_8/openerp/service/db.py", line 73, in dispatch
    return fn(*params)
  File "/home/odoo/project/odoo/8/odoo_8/openerp/service/db.py", line 217, in exp_restore
    restore_db(db_name, data_file.name, copy=copy)
  File "/home/odoo/project/odoo/8/odoo_8/openerp/service/db.py", line 260, in restore_db
    if openerp.tools.exec_pg_command(pg_cmd, *pg_args):
  File "/home/odoo/project/odoo/8/odoo_8/openerp/tools/misc.py", line 128, in exec_pg_command
    raise Exception('Postgres subprocess %s error %s' % (args2, rc))
Exception: Postgres subprocess ('/usr/bin/pg_restore', '--username=odoo', u'--dbname=any_db', '--no-owner', '/tmp/tmp6Xt1w_') error 1
```


Also after failed restoration of db; I need to upgrade the 'base' & 'web' + custom modules to let the db work like normal one.


Any help on this please.

My local copy of odoo runs on the commit point of  8.0 branch
030b15 : [I18N] point_of_sale: update unknwon customer

Thanks,


​--
Regards,
 
--
 
Devang Pipaliya
http://about.me/DevanGPipaliyA
 
​" Have a nice rest of the remaining day ! "​​