Availability |
Odoo Online
Odoo.sh
On Premise
|
Lines of code | 290 |
Technical Name |
backup_to_dropbox |
License | LGPL-3 |
Website | https://github.com/fasilwdr |
Versions | 14.0 15.0 13.0 |
Availability |
Odoo Online
Odoo.sh
On Premise
|
Lines of code | 290 |
Technical Name |
backup_to_dropbox |
License | LGPL-3 |
Website | https://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
Report comment
Any abuse of this reporting system will be penalizedProblem with the short-lived access token
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.
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:
Thank you for the update.
I will update it.
Error when try to Backup Now
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
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