Dropbox suddenly stopped working

First of All,

All was working fine and no change has been made on the system (except regular updates). I figured out that dropbox stopped uploading the files. Is there any command to check it out what’s wrong? I suspect it might be an issue on my side such as, firewall issue.

Found out a command to take manual dropbox backups but gives me this message.
No module named backup_manager.backup_manager

1 Like

@ferohers, if do you are using a updated version of the ERPNext or Frappe, can you provide a “Error Snapshot” from the dropbox routine?

Same here … nothing has changed except for the usual update through bench update. But not backup in Dropbox since the 24 December.
ERPNEXT 6.16.4, Frappe 6.17.6
Also it seems as I cannot find the error snapshot anymore. How can I find them?
Thanks
François

1 Like

My dropbox stopped working since December 29th, I’ve backups upto 28th Dec in my dropbox.

Logged in as Administrator and found “Error Snapshot”, there are many errors but no error has dropbox / backup in title.

Note :

  • Backups are working normally, I can Download latest Backups.
  • Emails and Email digests are working normally.
  • I am NOT getting any Backup upload successful or failed emails.
  • I’ve 32 errors in Error Snapshot that I can make sense of, It has no error related to Backup or Dropbox
erpnext@castlecraft-server:~/frappe-bench$ sudo supervisorctl status
frappe:frappe-web                RUNNING    pid 7422, uptime 0:15:35
frappe:frappe-worker             RUNNING    pid 7421, uptime 0:15:35
frappe:frappe-workerbeat         RUNNING    pid 7431, uptime 0:15:35
node-socketio                    RUNNING    pid 11376, uptime 5 days, 6:24:02
redis-async-broker               RUNNING    pid 11397, uptime 5 days, 6:24:02
redis-cache                      RUNNING    pid 11400, uptime 5 days, 6:24:01

Error List

PermissionError(u'Not Allowed, <function getdoc at 0x3b9f398>',)
AuthenticationError()
AuthenticationError()
AuthenticationError()
AuthenticationError()
PermissionError(u'Not Allowed, <function ping at 0x2fae1b8>',)
PermissionError(u'Not Allowed, <function get_notifications at 0x2a91578>',)
PermissionError(u'Not Allowed, <function getdoctype at 0x3a57050>',)
PermissionError(u'Not Allowed, <function getdoctype at 0x3a57050>',)
ValidationError('Fiscal Year 2014-2016 not found.',)
KeyError(u'web_logout?cmd=web_logout',)
KeyError(u'web_logout?cmd=web_logout',)
DoesNotExistError('Quotation New Quotation 1 not found',)
DoesNotExistError('Quotation New Quotation 1 not found',)
DoesNotExistError('Quotation New Quotation 1 not found',)
DoesNotExistError('Quotation New Quotation 1 not found',)
DoesNotExistError('Quotation New Quotation 1 not found',)
DoesNotExistError('Quotation New Quotation 1 not found',)
DoesNotExistError('Quotation New Quotation 1 not found',)
DoesNotExistError('Quotation New Quotation 1 not found',)
DoesNotExistError('Quotation New Quotation 1 not found',)
DoesNotExistError('Quotation New Quotation 1 not found',)
DoesNotExistError('Quotation New Quotation 1 not found',)
DoesNotExistError('Quotation New Quotation 1 not found',)
DoesNotExistError('Quotation New Quotation 1 not found',)
DoesNotExistError('Quotation New Quotation 1 not found',)
Approval Status must be 'Approved' or 'Rejected'
Date of Joining must be greater than Date of Birth
You are not authorized to set Frozen value
u'User disabled or missing'
u'User disabled or missing'
get() takes at least 1 argument (0 given)

@revant_one @Francois_Ifitwala I am sure it will be fixed soon. Maybe we should open a ticket on github ?

In my case dropbox backups stopped working around 1st Jan. No error snapshots. I wonder if the dropbox api has changed. Haven’t gotten around to checking the dropbox backup code yet.

I was able to get the backup working using the following command. Just not sure why the command isn’t being run by the scheduler.

bench execute frappe.integrations.doctype.dropbox_backup.dropbox_backup.take_backups_daily
2 Likes

@kar_m I will try the command when I get work :). Thank you very much by the way.

Thanks for that @Kar_M. I just tried it. We will see tomorrow if Backup have started again.
I am still very curious as to why all a sudden (or after a bench update probably) backup to Dropbox have stopped.

No luck on my end. No scheduled backups to dropbox. To clarify the above command only manually executes a backup. I know the scheduler controls the dropbox backup and that supervisord is taking care of the scheduler. Scheduler is enabled for the site, bench doctor shows no errors and supervisorctl status shows everything working.

Hi @Kar_M, all,

I got this issue when trying your command. Any idea?

xxxxxx@xxxx:~$ bench execute frappe.integrations.doctype.dropbox_backup.dropbox_backup.take_backups_daily
Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 162, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/franky1/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
main()
File “/home/franky1/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/franky1/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 700, in call
return self.main(*args, **kwargs)
File “/home/franky1/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 680, in main
rv = self.invoke(ctx)
File “/home/franky1/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1027, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/franky1/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1027, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/franky1/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 873, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/franky1/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 508, in invoke
return callback(*args, **kwargs)
File “/home/franky1/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py”, line 16, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/franky1/frappe-bench/apps/frappe/frappe/commands.py”, line 29, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/franky1/frappe-bench/apps/frappe/frappe/commands.py”, line 489, in execute
ret = frappe.get_attr(method)(*args, **kwargs)
File “/home/franky1/frappe-bench/apps/frappe/frappe/init.py”, line 766, in get_attr
if not local.flags.in_install and app_name not in get_installed_apps():
File “/home/franky1/frappe-bench/apps/frappe/frappe/init.py”, line 656, in get_installed_apps
installed = json.loads(db.get_global(“installed_apps”) or “[]”)
File “/home/franky1/frappe-bench/apps/frappe/frappe/database.py”, line 641, in get_global
return self.get_default(key, user)
File “/home/franky1/frappe-bench/apps/frappe/frappe/database.py”, line 653, in get_default
d = self.get_defaults(key, parent)
File “/home/franky1/frappe-bench/apps/frappe/frappe/database.py”, line 659, in get_defaults
defaults = frappe.defaults.get_defaults(parent)
File “/home/franky1/frappe-bench/apps/frappe/frappe/defaults.py”, line 72, in get_defaults
globald = get_defaults_for()
File “/home/franky1/frappe-bench/apps/frappe/frappe/defaults.py”, line 177, in get_defaults_for
where parent = %s order by creation""", (parent,), as_dict=1)
File “/home/franky1/frappe-bench/apps/frappe/frappe/database.py”, line 105, in sql
self.connect()
File “/home/franky1/frappe-bench/apps/frappe/frappe/database.py”, line 51, in connect
use_unicode=True, charset=‘utf8’)
File “/home/franky1/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/init.py”, line 81, in Connect
return Connection(*args, **kwargs)
File “/home/franky1/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 193, in init
super(Connection, self).init(*args, **kwargs2)
TypeError: connect() argument 2 must be string, not None

@Francois_Ifitwala @Kar_M @revant_one

The command works! However, cannot figure out what was wrong. The 2 article given below scare me alot :smile:


https://blogs.dropbox.com/developers/2015/04/deprecating-the-sync-and-datastore-apis/

@Francois_Ifitwala, I can’t say for sure what the problem is. Are you running the command from the frappe-bench folder? Don’t know if that has any effect.

@ferohers, I guess the code would have to be updated eventually. I’ve been thinking of building a basic backup manager for google drive. As for figuring out why the scheduler isn’t running the dropbox backup, I looked through frappe/hooks.py to see the dropbox backup is run as either a daily_long or weekly_long event.

Running bench trigger-scheduler-event daily_long or bench trigger-scheduler-event weekly_long had no effect. Changing the "frappe.integrations.doctype.dropbox_backup.dropbox_backup.take_backups_daily" to a daily event and running bench trigger-scheduler-event daily ran the backup. I know that email alerts and email digests go out every day so I’m assuming this is a solution. I just don’t know enough about scheduler events to know why daily_long events aren’t run.

1 Like

Dropbox backup started working after

bench setup supervisor
sudo service supervisor restart

This topic was automatically closed 20 hours after the last reply. New replies are no longer allowed.