Database Auto-Backup Upload
by Aurel Balanay - Evanscor Technology Solutions Inc http://www.evanscor.com
Odoo
Availability |
Odoo Online
Odoo.sh
On Premise
|
Odoo Apps Dependencies |
Discuss (mail)
|
Lines of code | 324 |
Technical Name |
auto_backup_upload |
Website | http://www.evanscor.com |
Versions | 10.0 12.0 |
Automatically Upload of Backups to Google Drive
This module is for uploading of backups to google drive. The local backup capability of this module is derived from the auto_backup module by Yenthe Van Ginneken
Developer Mode: Settings > Technical > Back-ups > Configure Backup
- Configure local backup (For steps: Please refer to auto_backup module of Yenthe Van Ginneken)
- Configure Google Drive Upload
- Tick Upload to Google Drive
- Fill Folder Id (Second Image will show where to find Drive Folder ID)
- Email Notification: Select users to receive email notification for successful and failed upload
- Tick Auto Remove: If you want to auto remove uploaded back-ups to google drive
- Uploaded Back-ups remove after x days: Retention period
To get the Google Drive Folder ID
- Go to your Google Drive Account
- Create New Folder
- Please see image for the Folder ID
Google Integration
- Go to Settings > General Setting > Google Integration
- Check Attached google documents to any record
- Generate Google Authorization code
- Paste code to the field provided
Please log in to comment on this module
Report comment
Any abuse of this reporting system will be penalizedthanks for great app, could you please upgrade it to v15, it will be appreciated
doesn't make automatic copies
109/5000 I am testing the module, if I run it manually it works without problems, but it doesn't make automatic copies.
Facing error.
aceback (most recent call last): File "/usr/lib/python3/dist-packages/odoo/tools/safe_eval.py", line 350, in safe_eval return unsafe_eval(c, globals_dict, locals_dict) File "", line 1, in File "/opt/odoo/addons/auto_backup_upload/models/db_backup.py", line 174, in schedule_backup self.google_drive_upload(rec, file_path, bkp_file) File "/opt/odoo/addons/auto_backup_upload/models/db_backup.py", line 218, in google_drive_upload response = r.json() File "/usr/lib/python3/dist-packages/requests/models.py", line 850, in json return complexjson.loads(self.text, **kwargs) File "/usr/lib/python3.5/json/__init__.py", line 319, in loads return _default_decoder.decode(s) File "/usr/lib/python3.5/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/odoo/http.py", line 656, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/usr/lib/python3/dist-packages/odoo/http.py", line 314, in _handle_exception raise pycompat.reraise(type(exception), exception, sys.exc_info()[2]) File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 87, in reraise raise value File "/usr/lib/python3/dist-packages/odoo/http.py", line 698, in dispatch result = self._call_function(**self.params) File "/usr/lib/python3/dist-packages/odoo/http.py", line 346, in _call_function return checked_call(self.db, *args, **kwargs) File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 97, in wrapper return f(dbname, *args, **kwargs) File "/usr/lib/python3/dist-packages/odoo/http.py", line 339, in checked_call result = self.endpoint(*a, **kw) File "/usr/lib/python3/dist-packages/odoo/http.py", line 941, in __call__ return self.method(*args, **kw) File "/usr/lib/python3/dist-packages/odoo/http.py", line 519, in response_wrap response = f(*args, **kw) File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 966, in call_button
Hi, thank you very much for this app, could you please update it to v15?.
update module
Could you update the module to version 13?
Module can only run manually
Hi, Your module seems to only work when run manually. It cannot create backup of database according to scheduled time. Doesn't even send the created backup to Google drive. Can you make a video showing all the necessity steps to have a smooth running of your module? I don't know if I am missing something.
Re: Module can only run manually
is there any error on the console when it runs?
On deploy mode odoo, conf file set list_db to False, for security, you programm failed!!! You need read database other way programmatically!!!
You module don’t work on any production server !!!
Re: On deploy mode odoo, conf file set list_db to False, for security, you programm failed!!! You need read database other way programmatically!!!
noted on this
Release for odoo 13?
Hi, Are there any plans of releasing a compatible version for odoo 13?
Re: Release for odoo 13?
drop me an email.
Error
If in conf. file set param list_db = False Error ! No such database exists! Error details:
Re: Error
Comment that line to your .conf. The program needs to read the Databases
error while manual testing Backup Scheduler
Error: Odoo Server Error Traceback (most recent call last): File "/odoo/odoo-server/odoo/tools/safe_eval.py", line 350, in safe_eval return unsafe_eval(c, globals_dict, locals_dict) File "", line 1, in File "/odoo/custom/addons/NIRANKARI-modi/auto_backup_upload/models/db_backup.py", line 130, in schedule_backup user_tz = pytz.timezone(self.env.context.get('tz') or self.env.user.tz) File "/usr/local/lib/python3.5/dist-packages/pytz/__init__.py", line 163, in timezone if zone.upper() == 'UTC': AttributeError: 'bool' object has no attribute 'upper' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/odoo/odoo-server/odoo/http.py", line 656, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/odoo/odoo-server/odoo/http.py", line 314, in _handle_exception raise pycompat.reraise(type(exception), exception, sys.exc_info()[2]) File "/odoo/odoo-server/odoo/tools/pycompat.py", line 87, in reraise raise value File "/odoo/odoo-server/odoo/http.py", line 698, in dispatch result = self._call_function(**self.params) File "/odoo/odoo-server/odoo/http.py", line 346, in _call_function return checked_call(self.db, *args, **kwargs) File "/odoo/odoo-server/odoo/service/model.py", line 97, 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 941, in __call__ return self.method(*args, **kw) File "/odoo/odoo-server/odoo/http.py", line 519, in response_wrap response = f(*args, **kw) File "/odoo/odoo-server/addons/web/controllers/main.py", line 966, in call_button action = self._call_kw(model, method, args, {}) File "/odoo/odoo-server/addons/web/controllers/main.py", line 954, in _call_kw return call_kw(request.env[model], method, args, kwargs) File "/odoo/odoo-server/odoo/api.py", line 749, in call_kw return _call_kw_multi(method, model, args, kwargs) File "/odoo/odoo-server/odoo/api.py", line 736, in _call_kw_multi result = method(recs, *args, **kwargs) File "/odoo/odoo-server/odoo/addons/base/models/ir_cron.py", line 76, in method_direct_trigger self.sudo(user=cron.user_id.id).ir_actions_server_id.run() File "/odoo/odoo-server/odoo/addons/base/models/ir_actions.py", line 569, in run res = func(action, eval_context=eval_context) File "/odoo/odoo-server/odoo/addons/base/models/ir_actions.py", line 445, 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 373, 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 86, in reraise raise value.with_traceback(tb) File "/odoo/odoo-server/odoo/tools/safe_eval.py", line 350, in safe_eval return unsafe_eval(c, globals_dict, locals_dict) File "", line 1, in File "/odoo/custom/addons/NIRANKARI-modi/auto_backup_upload/models/db_backup.py", line 130, in schedule_backup user_tz = pytz.timezone(self.env.context.get('tz') or self.env.user.tz) File "/usr/local/lib/python3.5/dist-packages/pytz/__init__.py", line 163, in timezone if zone.upper() == 'UTC': ValueError: : "'bool' object has no attribute 'upper'" while evaluating 'model.schedule_backup()'
Re: error while manual testing Backup Scheduler
Please check your user timezone if it is properly set-up