Skip to Content
Menu
v 13.0 Third Party 617
Download for v 13.0 Deploy on Odoo.sh
Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies Discuss (mail)
Lines of code 306
Technical Name backup_upload_google_drive
Websitehttps://www.tecno-go.com
You bought this module and need support? Click here!

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

Automatic sending of email notifications

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.
by
Alejandro Redondo Fernández
on 2/1/23, 4:59 AM

It has worked very well in Odoo 13 until December due to a change in google regulations for account access.

Now it is not able to update the token. Is there any solution?


by
Muhammad Eltyar
on 3/14/22, 9:37 AM

any update on v15 please, appraciated.


Seems excellent, I saw some videos but I got an error on instalation
by
tomas.pucutay@gmail.com
on 9/12/21, 2:32 PM

I'd like to ask why this happen when I'm trying to get this working.

I installed both google drive integration and this module, and configure correctly the GDrive token and the ID folder for backup. Then when I try to run backup scheduler it appears this

https://pastebin.com/RHQ5iTuM

The error no 2

  1. File "/mnt/extra-addons-customize/backup_upload_google_drive/models/db_backup.py", line 185, in google_drive_upload
  2.     'file': open("%s" % (str(file_path)), "rb")
  3. FileNotFoundError: [Errno 2] No such file or directory: '/odoo/backups/MalkaDB_2021-09-12_13_23_44.zip'
Re: Seems excellent, I saw some videos but I got an error on instalation
by
HI SISTEMS
on 9/12/21, 3:47 PM Author

Hi, you need this format to the path. /opt/odoo/backups


Odoo V14
by
crocodile
on 4/4/21, 11:27 AM

i wait for v14 it seems good thansk for all


This is module is great
by
Aadeel S. Puri
on 12/26/20, 4:58 PM

There are some missing information in this module.
Code error in models > db_backup.py

line# 199                notification_template = self.env['ir.model.data'].sudo().get_object('auto_backup_upload',
Replace with

line# 199                notification_template = self.env['ir.model.data'].sudo().get_object('backup_upload_google_drive',

line# 223                notification_template = self.env['ir.model.data'].sudo().get_object('auto_backup_upload',
Replace with

line# 223                notification_template = self.env['ir.model.data'].sudo().get_object('auto_backup_upload',

then go to settings, users, filter inactive users. select odoo bot and set it's timezone as per your timezone.

Then schedule will work perfectly.

Thanks for great module.


Error after successful backup on both drive and local server!
by
Ahmed Essam
on 4/23/22, 8:27 AM


  File "/usr/lib/python3/dist-packages/odoo/http.py", line 624, in _handle_exception

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

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 310, in _handle_exception

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

  File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 14, in reraise

    raise value

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 669, in dispatch

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

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 350, in _call_function

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

  File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 94, 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 915, in __call__

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

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 515, in response_wrap

    response = f(*args, **kw)

  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1343, in call_button

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

  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1331, in _call_kw

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

  File "/usr/lib/python3/dist-packages/odoo/api.py", line 387, in call_kw

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

  File "/usr/lib/python3/dist-packages/odoo/api.py", line 374, in _call_kw_multi

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

  File "/usr/lib/python3/dist-packages/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 "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_actions.py", line 537, in run

    res = func(action, eval_context=eval_context)

  File "/usr/lib/python3/dist-packages/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 "/usr/lib/python3/dist-packages/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 "/usr/lib/python3/dist-packages/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 "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 13, in reraise

    raise value.with_traceback(tb)

  File "/usr/lib/python3/dist-packages/odoo/tools/safe_eval.py", line 354, in safe_eval

    return unsafe_eval(c, globals_dict, locals_dict)

  File "", line 1, in <module>

  File "/usr/lib/python3/dist-packages/odoo/addons/backup_upload_google_drive/models/db_backup.py", line 171, in schedule_backup

    self.google_drive_upload(rec, file_path, bkp_file)

  File "/usr/lib/python3/dist-packages/odoo/addons/backup_upload_google_drive/models/db_backup.py", line 199, in google_drive_upload

    notification_template = self.env['ir.model.data'].sudo().get_object('auto_backup_upload',

  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_model.py", line 1750, in get_object

    return self.xmlid_to_object("%s.%s" % (module, xml_id), raise_if_not_found=True)

  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_model.py", line 1711, in xmlid_to_object

    t = self.xmlid_to_res_model_res_id(xmlid, raise_if_not_found)

  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_model.py", line 1695, in xmlid_to_res_model_res_id

    return self.xmlid_lookup(xmlid)[1:3]

  File "<decorator-gen-24>", line 2, in xmlid_lookup

  File "/usr/lib/python3/dist-packages/odoo/tools/cache.py", line 90, in lookup

    value = d[key] = self.method(*args, **kwargs)

  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_model.py", line 1684, in xmlid_lookup

    raise ValueError('External ID not found in the system: %s' % xmlid)

ValueError: <class 'ValueError'>: "External ID not found in the system: auto_backup_upload.email_google_drive_upload" while evaluating

'model.schedule_backup()'


by
Muhammad Eltyar
on 3/2/22, 3:58 AM

Hi, thank you very much for this app, could you please update it to v15?.


Error sftp_write does not exist
by
Angel Lozano
on 8/28/21, 1:02 AM
Hello, launches this error. pysftp and all the python dependencies seems to be installed properly. 
Odoo 13.

Odoo Server Error
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 1339, in call_kw
    return 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 383, in call_kw
    result = _call_kw_model(method, model, args, kwargs)
  File "/opt/odoo13/odoo/odoo/api.py", line 356, in _call_kw_model
    result = method(recs, *args, **kwargs)
  File "/opt/odoo13/odoo/odoo/models.py", line 1471, in load_views
    for [v_id, v_type] in views
  File "/opt/odoo13/odoo/odoo/models.py", line 1471, in <dictcomp>
    for [v_id, v_type] in views
  File "/opt/odoo13/odoo/addons/web/models/models.py", line 206, in fields_view_get
    r = super().fields_view_get(view_id, view_type, toolbar, submenu)
  File "/opt/odoo13/odoo/odoo/models.py", line 1558, in fields_view_get
    xarch, xfields = View.postprocess_and_fields(self._name, etree.fromstring(result['arch']), view_id)
  File "/opt/odoo13/odoo/odoo/addons/base/models/ir_ui_view.py", line 994, in postprocess_and_fields
    self.raise_view_error(message, view_id)
  File "/opt/odoo13/odoo/odoo/addons/base/models/ir_ui_view.py", line 614, in raise_view_error
    raise ValueError(message)
ValueError: Field `sftp_write` does not exist

Error context:
View `n/a`
[view_id: n/a, xml_id: n/a, model: n/a, parent_id: n/a]

Odoo V14 community?
by
Jacob Grundy
on 3/28/21, 2:08 AM

Hi There, any chance this will work on V14 community?


Re: Odoo V14 community?
by
HI SISTEMS
on 3/29/21, 11:09 PM Author

Hello, yes, of course in a few days I will start working on version 14 that will work for both the community and the enterprise 


Error while installing
by
suneel
on 1/11/21, 8:23 AM

Hi team,

while installing this module, i am getting below error. Please help in resolving the same.

Error:
Odoo Server Error

Traceback (most recent call last):
  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\backup_upload_google_drive\models\db_backup.py", line 28, in <module>
    import paramiko
ModuleNotFoundError: No module named 'paramiko'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 624, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 310, in _handle_exception
    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\tools\pycompat.py", line 14, in reraise
    raise value
  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 669, in dispatch
    result = self._call_function(**self.params)
  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 350, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\service\model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 339, in checked_call
    result = self.endpoint(*a, **kw)
  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 915, in __call__
    return self.method(*args, **kw)
  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\http.py", line 515, in response_wrap
    response = f(*args, **kw)
  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\web\controllers\main.py", line 1326, in call_button
    action = self._call_kw(model, method, args, kwargs)
  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\web\controllers\main.py", line 1314, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\api.py", line 387, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\api.py", line 374, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "<decorator-gen-59>", line 2, in button_immediate_install
  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_module.py", line 72, in check_and_log
    return method(self, *args, **kwargs)
  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_module.py", line 463, in button_immediate_install
    return self._button_immediate_function(type(self).button_install)
  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\base\models\ir_module.py", line 573, in _button_immediate_function
    modules.registry.Registry.new(self._cr.dbname, update_module=True)
  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\modules\registry.py", line 86, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\modules\loading.py", line 423, in load_modules
    loaded_modules, update_module, models_to_check)
  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\modules\loading.py", line 315, in load_marked_modules
    perform_checks=perform_checks, models_to_check=models_to_check
  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\modules\loading.py", line 182, in load_module_graph
    load_openerp_module(package.name)
  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\modules\module.py", line 377, in load_openerp_module
    __import__('odoo.addons.' + module_name)
  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\backup_upload_google_drive\__init__.py", line 3, in <module>
    from . import models
  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\backup_upload_google_drive\models\__init__.py", line 3, in <module>
    from . import db_backup
  File "C:\Program Files (x86)\Odoo 13.0\server\odoo\addons\backup_upload_google_drive\models\db_backup.py", line 31, in <module>
    'This module needs paramiko to automatically write backups to the FTP through SFTP. Please install paramiko on your system. (sudo pip3 install paramiko)')
ImportError: This module needs paramiko to automatically write backups to the FTP through SFTP. Please install paramiko on your system. (sudo pip3 install paramiko)


Regards,

Suneel

Re: Error while installing
by
HI SISTEMS
on 1/11/21, 11:18 AM Author

Hi, you need install the paramiko python module whit pip3 install paramiko