v 14.0 Third Party 46457
Download for v 14.0 Deploy on Odoo.sh
Lines of code 383
Technical Name auto_backup
LicenseLGPL-3
Websitehttp://www.odoo.yenthevg.com
Also available in version v 9.0 v 8.0 v 10.0 v 15.0 v 12.0 v 11.0 v 13.0
You bought this module and need support? Click here!

Automated backups

A tool for all your back-ups, internal and external!

Keep your Odoo data safe with this module. Take automated back-ups, remove them automatically and even write them to an external server through an encrypted tunnel. You can even specify how long local backups and external backups should be kept, automatically!

Start your free trial

Connect with an FTP Server

Keep your data safe, through an SSH tunnel!

Want to go even further and write your backups to an external server? You can with this module! Specify the credentials to the server, specify a path and everything will be backed up automatically. This is done through an SSH (encrypted) tunnel, thanks to pysftp, so your data is safe!

Test connection

Checks your credentials in one click

Want to make sure if the connection details are correct and if Odoo can automatically write them to the remote server? Simply click on the 'Test SFTP Connection' button and you will get message telling you if everything is OK, or what is wrong!

E-mail on backup failure

Stay informed of problems, automatically!

Do you want to know if the database backup failed? Check the checkbox 'Auto. E-mail on backup fail' and fill in your e-mail. Every time a backup fails you will get an e-mail in your mailbox with technical details.

Contact / Support

Need help or want extra features?

Need help with the configuration or want this module to have more functionalities? Please create a bug report on the Github issue tracker

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.
adding a function can directly restore the database is better
by
gavinguo
on 10/28/21, 2:20 AM

Thank you for developing a good module, adding a function can directly restore the database is better, in docker environment can also run normally  


Great module!
by
Els Guns
on 9/30/21, 5:08 AM



Installed properly but i couldn,t find the base directory where backups would be hold
by
kiron
on 7/11/21, 1:34 AM

can anyone told me what will be the base directory this module will take. Whenever i try backup in any directories its says permission denied error

Error:
Odoo Server Error

Traceback (most recent call last):
  File "/opt/odoo13/odoo/odoo/tools/safe_eval.py", line 354, in safe_eval
    return unsafe_eval(c, globals_dict, locals_dict)
  File "", line 1, in <module>
  File "/opt/odoo13/odoo-custom-addons/auto_backup/models/db_backup.py", line 124, in schedule_backup
    os.makedirs(rec.folder)
  File "/usr/lib/python3.8/os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/usr/lib/python3.8/os.py", line 223, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/odoo-custom-addons'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/odoo13/odoo/odoo/http.py", line 624, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo13/odoo/odoo/http.py", line 310, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "/opt/odoo13/odoo/odoo/tools/pycompat.py", line 14, in reraise
    raise value
  File "/opt/odoo13/odoo/odoo/http.py", line 669, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo13/odoo/odoo/http.py", line 350, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo13/odoo/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo13/odoo/odoo/http.py", line 339, in checked_call
    result = self.endpoint(*a, **kw)
  File "/opt/odoo13/odoo/odoo/http.py", line 915, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo13/odoo/odoo/http.py", line 515, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo13/odoo/addons/web/controllers/main.py", line 1343, in call_button
    action = self._call_kw(model, method, args, kwargs)
  File "/opt/odoo13/odoo/addons/web/controllers/main.py", line 1331, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/opt/odoo13/odoo/odoo/api.py", line 387, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/opt/odoo13/odoo/odoo/api.py", line 374, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/opt/odoo13/odoo/odoo/addons/base/models/ir_cron.py", line 83, in method_direct_trigger
    cron.with_user(cron.user_id).with_context(lastcall=cron.lastcall).ir_actions_server_id.run()
  File "/opt/odoo13/odoo/odoo/addons/base/models/ir_actions.py", line 537, in run
    res = func(action, eval_context=eval_context)
  File "/opt/odoo13/odoo/addons/website/models/ir_actions.py", line 59, in run_action_code_multi
    res = super(ServerAction, self).run_action_code_multi(action, eval_context)
  File "/opt/odoo13/odoo/odoo/addons/base/models/ir_actions.py", line 422, in run_action_code_multi
    safe_eval(action.sudo().code.strip(), eval_context, mode="exec", nocopy=True)  # nocopy allows to return 'action'
  File "/opt/odoo13/odoo/odoo/tools/safe_eval.py", line 377, in safe_eval
    pycompat.reraise(ValueError, ValueError('%s: "%s" while evaluating\n%r' % (ustr(type(e)), ustr(e), expr)), exc_info[2])
  File "/opt/odoo13/odoo/odoo/tools/pycompat.py", line 13, in reraise
    raise value.with_traceback(tb)
  File "/opt/odoo13/odoo/odoo/tools/safe_eval.py", line 354, in safe_eval
    return unsafe_eval(c, globals_dict, locals_dict)
  File "", line 1, in <module>
  File "/opt/odoo13/odoo-custom-addons/auto_backup/models/db_backup.py", line 124, in schedule_backup
    os.makedirs(rec.folder)
  File "/usr/lib/python3.8/os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/usr/lib/python3.8/os.py", line 223, in makedirs
    mkdir(name, mode)
ValueError: <class 'PermissionError'>: "13
Permission denied" while evaluating
'model.schedule_backup()'


by
Triton
on 5/3/21, 9:20 AM



A big thanks to the autor of this module
by
Joris
on 1/16/21, 9:39 AM
since I have known this module, it is amazing.
I installed it on Odoo 12 and everything works. thanks to the author.
However I have a platform on odoo 12 where I have a 3 tier architecture (proxy server, app server, and separate Database server) I have some little problem, because I don't know how I should set it up.
If you have a lead.
Thank you in advance.

Works as advertised, but gives error.
by
Guy Clerx
on 12/14/20, 12:33 PM

After some tinkering she works as advertised.
However, when installed I get an error.

Odoo Server Error
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 2090, in report_download
    data = dict(url_decode(url.split('?')[1]).items())  # decoding the args represented in JSON
IndexError: list index out of range

When uninstalled, the error disappears as well.
I'm not sure how these are related.


Odoo Server Error auto_backups
by
Lucas Arce
on 10/13/20, 6:05 PM

Hello, thanks first, install odoo 13 in digitalocean with your script and install the auto_backups module when executing it with the Odoobot user, the following error appears.

Error:

Odoo Server Error


Traceback (most recent call last):

  File "/odoo/odoo-server/odoo/tools/safe_eval.py", line 352, in safe_eval

    return unsafe_eval(c, globals_dict, locals_dict)

  File "", line 1, in <module>

  File "/odoo/custom/addons/auto_backup/models/db_backup.py", line 130, in schedule_backup

    fp = open(file_path, 'wb')

PermissionError: [Errno 13] Permission denied: '/odoo/backups/2020_10_13_21_43_21_EaDonJulio.zip'


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/odoo/odoo-server/odoo/http.py", line 624, in _handle_exception

    return super(JsonRequest, self)._handle_exception(exception)

  File "/odoo/odoo-server/odoo/http.py", line 310, in _handle_exception

    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])

  File "/odoo/odoo-server/odoo/tools/pycompat.py", line 14, in reraise

    raise value

  File "/odoo/odoo-server/odoo/http.py", line 669, in dispatch

    result = self._call_function(**self.params)

  File "/odoo/odoo-server/odoo/http.py", line 350, in _call_function

    return checked_call(self.db, *args, **kwargs)

  File "/odoo/odoo-server/odoo/service/model.py", line 94, in wrapper

    return f(dbname, *args, **kwargs)

  File "/odoo/odoo-server/odoo/http.py", line 339, in checked_call

    result = self.endpoint(*a, **kw)

  File "/odoo/odoo-server/odoo/http.py", line 915, in __call__

    return self.method(*args, **kw)

  File "/odoo/odoo-server/odoo/http.py", line 515, in response_wrap

    response = f(*args, **kw)

  File "/odoo/odoo-server/addons/web/controllers/main.py", line 1326, in call_button

    action = self._call_kw(model, method, args, kwargs)

  File "/odoo/odoo-server/addons/web/controllers/main.py", line 1314, in _call_kw

    return call_kw(request.env[model], method, args, kwargs)

  File "/odoo/odoo-server/odoo/api.py", line 387, in call_kw

    result = _call_kw_multi(method, model, args, kwargs)

  File "/odoo/odoo-server/odoo/api.py", line 374, in _call_kw_multi

    result = method(recs, *args, **kwargs)

  File "/odoo/odoo-server/odoo/addons/base/models/ir_cron.py", line 83, in method_direct_trigger

    self.with_user(cron.user_id).ir_actions_server_id.run()

  File "/odoo/odoo-server/odoo/addons/base/models/ir_actions.py", line 545, in run

    res = func(action, eval_context=eval_context)

  File "/odoo/odoo-server/addons/website/models/ir_actions.py", line 59, in run_action_code_multi

    res = super(ServerAction, self).run_action_code_multi(action, eval_context)

  File "/odoo/odoo-server/odoo/addons/base/models/ir_actions.py", line 430, in run_action_code_multi

    safe_eval(action.sudo().code.strip(), eval_context, mode="exec", nocopy=True)  # nocopy allows to return 'action'

  File "/odoo/odoo-server/odoo/tools/safe_eval.py", line 375, in safe_eval

    pycompat.reraise(ValueError, ValueError('%s: "%s" while evaluating\n%r' % (ustr(type(e)), ustr(e), expr)), exc_info[2])

  File "/odoo/odoo-server/odoo/tools/pycompat.py", line 13, in reraise

    raise value.with_traceback(tb)

  File "/odoo/odoo-server/odoo/tools/safe_eval.py", line 352, in safe_eval

    return unsafe_eval(c, globals_dict, locals_dict)

  File "", line 1, in <module>

  File "/odoo/custom/addons/auto_backup/models/db_backup.py", line 130, in schedule_backup

    fp = open(file_path, 'wb')

ValueError: <class 'PermissionError'>: "13

Permission denied" while evaluating

'model.schedule_backup()'

Re: Odoo Server Error auto_backups
by
Yenthe
on 10/17/20, 5:24 AM Author

Hi,

Your folder "/odoo/backups" simply doesn't have enough access rights for your Odoo user. Modify the rights of the folder and it will work.


by
HishamOsama
on 9/5/21, 7:23 PM

HI, i have a small problem. the auto back-up is working but it gives me an empty file (0kb) zip file what should i do to resolve this ?


by
Shreyanka
on 5/12/21, 2:58 AM

Hi. I am trying to install Database auto-backup module by Yenthe Van Ginneken but I am getting an error. (Error: Import Error: This module needs paramiko to automatically write backups to the FTP through SFTP. Please install paramiko on your system. (sudo pip3 install paramiko)). 
Even after installing the paramiko i am facing the same issue.

 


by
ERPBox Solutions
on 4/11/21, 8:39 PM

Hello Yenthe,


I downloaded the module and tried to install it but get the following error. I already have paramiko installed so I am not sure why I keep getting this error. 


Error:

Odoo Server Error

.....

Traceback (most recent call last):

  File "/opt/odoo14/odoo/odoo/http.py", line 639, in _handle_exception

    return super(JsonRequest, self)._handle_exception(exception)

  File "/opt/odoo14/odoo/odoo/http.py", line 315, in _handle_exception

    raise exception.with_traceback(None) from new_cause

ImportError: This module needs paramiko to automatically write backups to the FTP through SFTP. Please install paramiko on your system. (sudo pip3 install paramiko)


It works in odoo.sh?
by
Hector Garza
on 2/16/21, 5:29 PM

Does it works in odoo.sh database?


its not installing in to my odoo
by
awkesupermarket@gmail.com
on 2/16/21, 3:50 AM

Error:

Odoo Server Error


Traceback (most recent call last):

  File "F:\odoo 14\server\odoo\addons\base\models\ir_http.py", line 237, in _dispatch

    result = request.dispatch()

  File "F:\odoo 14\server\odoo\http.py", line 683, in dispatch

    result = self._call_function(**self.params)

  File "F:\odoo 14\server\odoo\http.py", line 359, in _call_function

    return checked_call(self.db, *args, **kwargs)

  File "F:\odoo 14\server\odoo\service\model.py", line 94, in wrapper

    return f(dbname, *args, **kwargs)

  File "F:\odoo 14\server\odoo\http.py", line 347, in checked_call

    result = self.endpoint(*a, **kw)

  File "F:\odoo 14\server\odoo\http.py", line 912, in __call__

    return self.method(*args, **kw)

  File "F:\odoo 14\server\odoo\http.py", line 531, in response_wrap

    response = f(*args, **kw)

  File "F:\odoo 14\server\odoo\addons\web\controllers\main.py", line 1381, in call_button

    action = self._call_kw(model, method, args, kwargs)

  File "F:\odoo 14\server\odoo\addons\web\controllers\main.py", line 1369, in _call_kw

    return call_kw(request.env[model], method, args, kwargs)

  File "F:\odoo 14\server\odoo\api.py", line 396, in call_kw

    result = _call_kw_multi(method, model, args, kwargs)

  File "F:\odoo 14\server\odoo\api.py", line 383, in _call_kw_multi

    result = method(recs, *args, **kwargs)

  File "<decorator-gen-72>", line 2, in button_immediate_install

  File "F:\odoo 14\server\odoo\addons\base\models\ir_module.py", line 73, in check_and_log

    return method(self, *args, **kwargs)

  File "F:\odoo 14\server\odoo\addons\base\models\ir_module.py", line 474, in button_immediate_install

    return self._button_immediate_function(type(self).button_install)

  File "F:\odoo 14\server\odoo\addons\base\models\ir_module.py", line 592, in _button_immediate_function

    modules.registry.Registry.new(self._cr.dbname, update_module=True)

  File "F:\odoo 14\server\odoo\modules\registry.py", line 89, in new

    odoo.modules.load_modules(registry._db, force_demo, status, update_module)

  File "F:\odoo 14\server\odoo\modules\loading.py", line 455, in load_modules

    loaded_modules, update_module, models_to_check)

  File "F:\odoo 14\server\odoo\modules\loading.py", line 348, in load_marked_modules

    perform_checks=perform_checks, models_to_check=models_to_check

  File "F:\odoo 14\server\odoo\modules\loading.py", line 178, in load_module_graph

    load_openerp_module(package.name)

  File "F:\odoo 14\server\odoo\modules\module.py", line 358, in load_openerp_module

    __import__('odoo.addons.' + module_name)

  File "F:\odoo 14\server\odoo\addons\auto_backup\__init__.py", line 1, in <module>

    from . import models

  File "F:\odoo 14\server\odoo\addons\auto_backup\models\__init__.py", line 2, in <module>

    from . import db_backup

  File "F:\odoo 14\server\odoo\addons\auto_backup\models\db_backup.py", line 20, in <module>

    'This module needs paramiko to automatically write backups to the FTP through SFTP. '

Exception


The above exception was the direct cause of the following exception:


Traceback (most recent call last):

  File "F:\odoo 14\server\odoo\http.py", line 639, in _handle_exception

    return super(JsonRequest, self)._handle_exception(exception)

  File "F:\odoo 14\server\odoo\http.py", line 315, in _handle_exception

    raise exception.with_traceback(None) from new_cause

ImportError: This module needs paramiko to automatically write backups to the FTP through SFTP. Please install paramiko on your system. (sudo pip3 install paramiko)


Works with Odoo.sh ?
by
JJB Conseil
on 1/4/21, 9:14 AM

Hello, Could you please tell me if this module works within odoo.sh ?
Regards.


by
abdouli lidar
on 12/25/20, 3:21 PM

ImportError: This module needs paramiko to automatically write backups to the FTP through SFTP. Please install paramiko on your system. (sudo pip3 install paramiko)


no work for me
by
compusave-it.dz
on 12/17/20, 7:06 AM

Erreur:

Odoo Server Error


Traceback (most recent call last):

  File "/odoo/odoo-server/odoo/addons/base/models/ir_http.py", line 237, in _dispatch

    result = request.dispatch()

  File "/odoo/odoo-server/odoo/http.py", line 683, in dispatch

    result = self._call_function(**self.params)

  File "/odoo/odoo-server/odoo/http.py", line 359, in _call_function

    return checked_call(self.db, *args, **kwargs)

  File "/odoo/odoo-server/odoo/service/model.py", line 94, in wrapper

    return f(dbname, *args, **kwargs)

  File "/odoo/odoo-server/odoo/http.py", line 347, in checked_call

    result = self.endpoint(*a, **kw)

  File "/odoo/odoo-server/odoo/http.py", line 912, in __call__

    return self.method(*args, **kw)

  File "/odoo/odoo-server/odoo/http.py", line 531, in response_wrap

    response = f(*args, **kw)

  File "/odoo/odoo-server/addons/web/controllers/main.py", line 1381, in call_button

    action = self._call_kw(model, method, args, kwargs)

  File "/odoo/odoo-server/addons/web/controllers/main.py", line 1369, in _call_kw

    return call_kw(request.env[model], method, args, kwargs)

  File "/odoo/odoo-server/odoo/api.py", line 396, in call_kw

    result = _call_kw_multi(method, model, args, kwargs)

  File "/odoo/odoo-server/odoo/api.py", line 383, in _call_kw_multi

    result = method(recs, *args, **kwargs)

  File "<decorator-gen-72>", line 2, in button_immediate_install

  File "/odoo/odoo-server/odoo/addons/base/models/ir_module.py", line 73, in check_and_log

    return method(self, *args, **kwargs)

  File "/odoo/odoo-server/odoo/addons/base/models/ir_module.py", line 474, in button_immediate_install

    return self._button_immediate_function(type(self).button_install)

  File "/odoo/odoo-server/odoo/addons/base/models/ir_module.py", line 592, in _button_immediate_function

    modules.registry.Registry.new(self._cr.dbname, update_module=True)

  File "/odoo/odoo-server/odoo/modules/registry.py", line 89, in new

    odoo.modules.load_modules(registry._db, force_demo, status, update_module)

  File "/odoo/odoo-server/odoo/modules/loading.py", line 455, in load_modules

    loaded_modules, update_module, models_to_check)

  File "/odoo/odoo-server/odoo/modules/loading.py", line 348, in load_marked_modules

    perform_checks=perform_checks, models_to_check=models_to_check

  File "/odoo/odoo-server/odoo/modules/loading.py", line 178, in load_module_graph

    load_openerp_module(package.name)

  File "/odoo/odoo-server/odoo/modules/module.py", line 358, in load_openerp_module

    __import__('odoo.addons.' + module_name)

  File "/odoo/odoo-server/addons/auto_backup/__init__.py", line 1, in <module>

    from . import models

  File "/odoo/odoo-server/addons/auto_backup/models/__init__.py", line 2, in <module>

    from . import db_backup

  File "/odoo/odoo-server/addons/auto_backup/models/db_backup.py", line 20, in <module>

    'This module needs paramiko to automatically write backups to the FTP through SFTP. '

Exception


The above exception was the direct cause of the following exception:


Traceback (most recent call last):

  File "/odoo/odoo-server/odoo/http.py", line 639, in _handle_exception

    return super(JsonRequest, self)._handle_exception(exception)

  File "/odoo/odoo-server/odoo/http.py", line 315, in _handle_exception

    raise exception.with_traceback(None) from new_cause

ImportError: This module needs paramiko to automatically write backups to the FTP through SFTP. Please install paramiko on your system. (sudo pip3 install paramiko)


by
Guy Clerx
on 12/14/20, 12:31 PM

She works amazingly after some tinkering to get her running.
However when active I get this error :

Odoo Server Error
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 2090, in report_download
    data = dict(url_decode(url.split('?')[1]).items())  # decoding the args represented in JSON
IndexError: list index out of range

And when I remove the app the error is gone as well.
I'm not sure how this is related?


Hi Yenthe Van Ginneken.
by
Oleksandr
on 10/19/20, 9:53 AM

After installing in odoo 14 then I go to Settings / Technical / Automation / Scheduled Actions. But there no any Backup action. Can you write here what parameters I must write to new Action to run backup? Thanks


get error 'Here is what we got instead: Raw'
by
liuhaiyan
on 10/9/20, 8:41 AM

hello,

I want to backup database to my Synology NAS.

when I click 'test sftp connections',I get these error.how can fix the error?thanks.

Here is what we got instead:
Raw