Multisite scheduled backup is only running for one site

I have 3 sites in a standalone multisite setup and recently noticed that only one of them is actually performing the scheduled backup.
There does not appear to be anything in the logs about the other sites failing to backup. The unicorn.stdout.log shows only the one site being backed up. A manual backup of all sites works fine.
It seems to have stopped working around the time I updated from 1.4 to 1.5 (on 1.6 now but no change).

Any ideas on how to diagnose this?

3 Likes

Could the issue be connected to this fix?

https://github.com/discourse/discourse/commit/737c6067104e06a9b96c11956062e10eccebf9e9

The cancel_scheduled_job call in ScheduleBackup is different to the others I found in that it doesn’t supply any args.

My WAG is that perhaps each RailsMultisite iteration in the base scheduler is cancelling the previous scheduled backup leaving only the last one to run?!

3 Likes

While the issue was not related to that commit (the bug was present before), it got me to the right point: we were indeed canceling jobs for all the sites on a multisite install… :expressionless:

https://github.com/discourse/discourse/commit/7db2083d4553001acbb12771a261e8dc61151eaf

4 Likes

That’s awesome news, thanks!
I’m tracking the stable branch so I assume I will need to wait until v1.7 before I see this fix?

Yes, in general we only backport egregious bugs and security fixes into stable.

If you are going to be stuck on stable you can always look at adding a cron job to backup your sites.

2 Likes

Thanks @sam, understood.

BTW, when I marked the earlier post a the solution it seems to have removed the preview of the link. Is that supposed to happen?

That is some weird bug…

Oh, its back now anyway.

Yeah I rebuilt the html