version v2.3.0.beta8 +144
destination clean install, restored via shell
The discussion revolves around a bug in Discourse’s backup restoration process where the disable_email setting is incorrectly set to non-staff instead of preserving the original value. skygunner initially reported the issue, noting that restoring a backup should maintain the exact email settings. pfaffman and gerhard clarified that this behavior was intended as a feature to prevent email spam during restores, but it was broken and has since been fixed. michaeld pointed out that setting disable_email to non-staff when it was previously no (fully enabled) is unintended, as it partially enables emails for staff. gerhard acknowledged the oversight and confirmed the bug was fixed in commit 3aca070. techAPJ supported the original behavior for staff convenience, while skygunner emphasized the importance of preserving settings exactly as they were.
version v2.3.0.beta8 +144
destination clean install, restored via shell
Ahh! I think that I’ve seen that but thought it was my imagination.
I can’t tell when the feature got added, but if you don’t want to disable emails, it can be set via an option, but by default it set disable_email to “non-staff”.
This is a fantastic feature. It is pretty rare that I want to restore a backup and have it immediately start spewing mail.
That’s not a bug. It’s a feature that was added a long time ago, but it was broken for as long as I can remember. ![]()
I fixed it two months ago in FIX: Outgoing emails were not disabled after restoring backup · discourse/discourse@dc961fe · GitHub
You can disabled that behavior when you restore from the command line:
discourse restore --disable_emails=false <filename>
A documented bug is a feature. Everyone knows that.
But a broken feature. . . . Hmm.
I’m very happy that this has been fixed. In addition to nearly every time I restore a backup having to worry that it’ll start spewing email. This is also very handy for staging sites that can now safely restore a backup and not have to worry about mail going out (my previous solution was to just make the mail settings invalid).
This is fantastic. ![]()
Being able to disable the now un-broken behavior is fine too. ![]()
OP says it is being set to non-staff from no.
So if it was completely disabled, it’s now partially enabled (for staff).
That doesn’t seem desired behavior?
Oh, good catch! I missed that detail in the topic title. ![]()
Well, then it’s a bug. It will be fixed.
disable emails being set to no means: do not disable emails for any user. So it’s completely enabled.
That said, I prefer the existing behaviour of setting disable emails to non-staff regardless of prior setting value as I can be sure that whatever be the case, email will always be enabled for me as staff on site I am restoring.
That’s cool. If it’s a feature.
it could be useful for some people , when you do not want to have mails sent to members while a backup is restored.
For me, I thought when I restore something, the settings should be just exactly same as when I did the backup, that’s why I opened this topic.
There was a bug in there after all. It’s fixed.
https://github.com/discourse/discourse/commit/3aca0703116c5d9b776835c5d00c84c4d6592062