Drop box backup not working

Backup Upload Failed

Oops, your automated backup to Dropbox failed.

Error message:

Traceback (innermost last):
File “/home/frappe/press/benches/1606241046/apps/frappe/frappe/integrations/doctype/dropbox_backup/dropbox_backup.py”, line 44, in take_backups_dropbox
did_not_upload, error_log = backup_to_dropbox()
File “/home/frappe/press/benches/1606241046/apps/frappe/frappe/integrations/doctype/dropbox_backup/dropbox_backup.py”, line 136, in backup_to_dropbox
dropbox_client = get_dropbox_client()
File “/home/frappe/press/benches/1606241046/apps/frappe/frappe/integrations/doctype/dropbox_backup/dropbox_backup.py”, line 166, in get_dropbox_client
token = dropbox_client.create_oauth2_access_token()
File “/home/frappe/press/benches/1606241046/env/lib/python2.7/site-packages/dropbox/client.py”, line 189, in create_oauth2_access_token
r = self.rest_client.POST(url, params, headers)
File “/home/frappe/press/benches/1606241046/env/lib/python2.7/site-packages/dropbox/rest.py”, line 322, in POST
return cls.IMPL.POST(*n, **kw)
File “/home/frappe/press/benches/1606241046/env/lib/python2.7/site-packages/dropbox/rest.py”, line 260, in POST
File “/home/frappe/press/benches/1606241046/env/lib/python2.7/site-packages/dropbox/rest.py”, line 235, in request
raise ErrorResponse(r, r.read())
ErrorResponse: [401] u’Access token not found.’

correctly set key and password in sites.config

please let me know how to solve this issue

You will have to add access token in site’s config

Refer :

brief :
create new app Login - Dropbox
After the app is created, note the app key and app secret and enter in sites/{sitename}/site_config.json as follows,

 "db_name": "demo",  
 "db_password": "DZ1Idd55xJ9qvkHvUH", 
 "dropbox_access_key": "ACCESSKEY", 
 "dropbox_secret_key": "SECRECTKEY" 

I added access tokens in site config file.but it shows the same error

Try adding at site_config.json the ip of your installation, that worked for me

"dropbox_secret_key": "YOUR SECRET KEY", "host_name": "http://YOUR HOST TO ACCESS ERPNEXT" }

Restart frappe and try to test the service, run:

bench restart bench --site site1.local --force trigger-scheduler-event daily_long

Take in mind you must grant access to dropbox in Setup>DropBox Backup>Allow Dropbox Backup. You will be redirect to ERPNext page showing you “Dropbox Access Granted”

Hope it helps,