Database auto-backup to DropBox

by
Odoo
v 14.0 Third Party 522
Download for v 14.0 Deploy on Odoo.sh
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 290
Technical Name backup_to_dropbox
LicenseLGPL-3
Websitehttps://github.com/fasilwdr
Versions 14.0 15.0 13.0
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 290
Technical Name backup_to_dropbox
LicenseLGPL-3
Websitehttps://github.com/fasilwdr
Versions 14.0 15.0 13.0

Automated backups to DropBox

A tool for backup both Database and File store

Features

Local Backup

Taking backups to local folder

Backups to DropBox

Uploading backups to DropBox

Error Notification

Sending E-mail on backup failure

Auto Remove Backups

Remove uploaded back-ups from both local and dropbox after n days(as per you given)

Pre-Requirement

Install dropbox python library and dependencies

pip install tqdm

pip install dropbox

Configure Dropbox API

Go to  this URL and Create account in Dropbox or Login if you have account already.

Configure Backups

Go to Settings --> Technical --> Configure back-ups

E-mail on backup failure

Stay informed of problems, automatically!

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

Change Scheduled Backups

Go to Settings --> Technical --> Scheduled Actions --> DropBox Backup scheduler

Contact / Support

Need help or want extra features?

Need help with the configuration or want this module to have more functionalities? Please contact me on email

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
ubuntu
on 9/5/22, 8:15 AM



Problem with the short-lived access token
by
alexander chevka
on 4/29/22, 5:44 AM

Dropbox is switching to issuing short-lived access tokens (and optional refresh tokens) instead of long-lived access tokens. Developers of existing third party apps received advanced noted of this change by email. More information can be found here. Apps can still get long-term access by requesting "offline" access though, in which case the app receives a "refresh token" that can be used to retrieve new short-lived access tokens as needed, without further manual user intervention. This is something that will need to be implemented in the app itself though, by the developer. You may need to install an updated version of the third party app with that implemented, or contact the developer if they haven't released such an update yet.


by
Yann JAMMES
on 4/20/22, 6:02 AM

Hello, local backup forks fine, but its seems some recent change on dropbox token behaviour have break the dropbox save part as long live token have been replaced by short or autorefresh one, an january post of dropbox forum saying :

Dropbox is switching to issuing short-lived access tokens (and optional refresh tokens) instead of long-lived access tokens. Developers of existing third party apps received advanced noted of this change by email. More information can be found here. Apps can still get long-term access by requesting "offline" access though, in which case the app receives a "refresh token" that can be used to retrieve new short-lived access tokens as needed, without further manual user intervention. This is something that will need to be implemented in the app itself though, by the developer. You may need to install an updated version of the third party app with that implemented, or contact the developer if they haven't released such an update yet.


Can you make the update to make it work again?

When i create an app in dropbox, i dont have the "acces token expiration" menu to select "no-expiration", and the generated token disapear after refreshing the page so i guess the token isnt even activated


Thanks

Re:
by
Fasil
on 4/20/22, 6:17 AM Author

Thank you for the update.

I will update it.


Error when try to Backup Now
by
alexander chevka
on 12/5/21, 12:36 PM

Error:

Odoo Server Error


Traceback (most recent call last):

  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 237, in _dispatch

    result = request.dispatch()

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

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

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 360, 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 348, in checked_call

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

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

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

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

    response = f(*args, **kw)

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

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

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

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

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

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

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

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

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

    fp = open(file_path, 'wb')

Exception


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


Traceback (most recent call last):

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

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

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

    raise exception.with_traceback(None) from new_cause

PermissionError: [Errno 13] Permission denied: '/usr/lib/python3/dist-packages/odoo/backups/2021_12_05_17_34_40_klikcare.zip'

Re: Error when try to Backup Now
by
Fasil
on 12/5/21, 1:21 PM Author

The error which you sent because of permission issue.

Please give permission to the directory

If you are using Linux OS, you can use below command. 

sudo chmod -R a+rwX /path/to/folder

Try after given the required permission to the folder