Odoo Help

0

How to make Odoo v10 backup database automatically

By
Marcio Valenzuela P
on 12/19/17, 5:08 PM 710 views

I have a cron job for uploading a folder to an ftp server.  At present that folder contains a odoo database I backed up manually.

Can anyone point me it the direction of making odoo back up its database at a given time?  Ive tried the auto-backup module suggested below but installing it doesnt seem to finish.  The button stays at Cancel Install:


This is what I get in the terminal when running odoo as the app just hangs without displaying text:

2017-12-22 02:32:48,095 1348 ERROR santiapps werkzeug: Error on request:
Traceback (most recent call last):
  File "/Users/mars/odoo-env/lib/python2.7/site-packages/werkzeug/serving.py", line 177, in run_wsgi
    execute(self.server.app)
  File "/Users/mars/odoo-env/lib/python2.7/site-packages/werkzeug/serving.py", line 165, in execute
    application_iter = app(environ, start_response)
  File "/Users/mars/odoo/openerp/service/server.py", line 246, in app
    return self.app(e, s)
  File "/Users/mars/odoo/openerp/service/wsgi_server.py", line 184, in application
    return application_unproxied(environ, start_response)
  File "/Users/mars/odoo/openerp/service/wsgi_server.py", line 170, in application_unproxied
    result = handler(environ, start_response)
  File "/Users/mars/odoo/openerp/http.py", line 1495, in __call__
    return self.dispatch(environ, start_response)
  File "/Users/mars/odoo/openerp/http.py", line 1659, in dispatch
    result = ir_http._dispatch()
  File "/Users/mars/odoo/addons/website_sale/models/ir_http.py", line 12, in _dispatch
    return super(IrHttp, self)._dispatch()
  File "/Users/mars/odoo/addons/website/models/ir_http.py", line 190, in _dispatch
    resp = super(ir_http, self)._dispatch()
  File "/Users/mars/odoo/addons/web_editor/models/ir_http.py", line 16, in _dispatch
    return super(ir_http, self)._dispatch()
  File "/Users/mars/odoo/openerp/addons/base/ir/ir_http.py", line 187, in _dispatch
    return self._handle_exception(e)
  File "/Users/mars/odoo/addons/website/models/ir_http.py", line 239, in _handle_exception
    return super(ir_http, self)._handle_exception(exception)
  File "/Users/mars/odoo/openerp/addons/base/ir/ir_http.py", line 158, in _handle_exception
    return request._handle_exception(exception)
  File "/Users/mars/odoo/openerp/http.py", line 786, in _handle_exception
    return super(HttpRequest, self)._handle_exception(exception)
  File "/Users/mars/odoo/openerp/addons/base/ir/ir_http.py", line 183, in _dispatch
    result = request.dispatch()
  File "/Users/mars/odoo/openerp/http.py", line 845, in dispatch
    r = self._call_function(**self.params)
  File "/Users/mars/odoo/openerp/http.py", line 321, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/Users/mars/odoo/openerp/service/model.py", line 118, in wrapper
    return f(dbname, *args, **kwargs)
  File "/Users/mars/odoo/openerp/http.py", line 314, in checked_call
    result = self.endpoint(*a, **kw)
  File "/Users/mars/odoo/openerp/http.py", line 964, in __call__
    return self.method(*args, **kw)
  File "/Users/mars/odoo/openerp/http.py", line 514, in response_wrap
    response = f(*args, **kw)
  File "/Users/mars/odoo/addons/web/controllers/main.py", line 498, in load_locale
    addons_path = http.addons_manifest['web']['addons_path']
KeyError: 'web'
2017-12-22 02:32:48,134 1348 INFO santiapps openerp.models.unlink: User #1 deleted ir.attachment records with IDs: [942]
2017-12-22 02:32:48,208 1348 INFO santiapps openerp.models.unlink: User #1 deleted ir.attachment records with IDs: [943]
2017-12-22 02:32:48,242 1348 INFO santiapps openerp.models.unlink: User #1 deleted ir.attachment records with IDs: [944]
2017-12-22 02:32:48,304 1348 INFO santiapps openerp.models.unlink: User #1 deleted ir.attachment records with IDs: [945]
2017-12-22 02:32:48,521 1348 INFO santiapps openerp.models.unlink: User #1 deleted ir.attachment records with IDs: [1682]
2017-12-22 02:32:48,644 1348 INFO santiapps openerp.models.unlink: User #1 deleted ir.attachment records with IDs: [1683]
2017-12-22 02:32:48,785 1348 INFO santiapps werkzeug: 127.0.0.1 - - [22/Dec/2017 02:32:48] "GET /web/static/src/img/favicon.ico HTTP/1.1" 404 -
2017-12-22 02:33:00,125 1348 INFO santiapps werkzeug: 127.0.0.1 - - [22/Dec/2017 02:33:00] "POST /longpolling/poll HTTP/1.1" 200 -
2017-12-22 02:33:05,183 1348 INFO santiapps werkzeug: 127.0.0.1 - - [22/Dec/2017 02:33:05] "POST /longpolling/poll HTTP/1.1" 200 -


and this is what the app looks like:


What I did:

1. stopped odoo, restarted it and reloaded odoo web=same

2. stopped odoo, removed auto_backup folder=odoo loads fine

So its definitely an issue with the auto_backup module

1

Niyas Raphy

--Niyas Raphy--
11904
| 5 6 9
Calicut, India
--Niyas Raphy--

Odoo Techno Functionalist

Feel free to contact :  niyasraphyk@gmail.com

Niyas Raphy
On 12/19/17, 9:30 PM

Hi,

Please check this community module for the purpose of automatic back up : https://www.odoo.com/apps/modules/10.0/auto_backup/

Thanks

I tried installing it but it makes my odoo hang upon logging in. I copied the folder to add-ons, updated the app list clicked install, stopped/started the service and when logging back in only part of the page displayed. I inspected the element in Firefox and saw that it couldn't load the web assets English locale. I couldn't logout or go anywhere because there were no links anywhere. I had to close the browser, remove the auto backup folder from add-ons, restart the service and then I was able to log back in.

Marcio Valenzuela P
on 12/20/17, 12:49 PM

Check out this : https://www.odoo.yenthevg.com/automated-backups-in-odoo/

You can ask the queries to the author of the module :)

Niyas Raphy
on 12/20/17, 10:34 PM

Yes I was able to install it and pysftp, but pysftp caused an issue with pyopenssl and loading odoo as a web app became an issue. I was doing it on a test database but on the same machine as the production db. I was forced to uninstall it quickly. I will try it again today.

Marcio Valenzuela P
on 12/21/17, 8:58 AM

I just installed it again and I get the same issue. It doesnt finish installing. Ive updated the OP.

Marcio Valenzuela P
on 12/21/17, 10:10 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.

Register

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

2 follower(s)

Stats

Asked: 12/19/17, 5:08 PM
Seen: 710 times
Last updated: 12/21/17, 9:40 PM