When restoring a backup, the 'disable email' will be set to non-staff from no

(Skygunner) #1

version v2.3.0.beta8 +144

destination clean install, restored via shell

0 Likes

(Jay Pfaffman) #2

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.

3 Likes

(Gerhard Schlager) #3

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. :slight_smile:

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>
5 Likes

(Jay Pfaffman) #4

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).

:tada: This is fantastic. :tada:

Being able to disable the now un-broken behavior is fine too. :slight_smile:

2 Likes

(Michael - DiscourseHosting.com) #5

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?

2 Likes

(Gerhard Schlager) #6

Oh, good catch! I missed that detail in the topic title. :blush:
Well, then it’s a bug. It will be fixed.

5 Likes

(Arpit Jalan) #8

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.

3 Likes

(Skygunner) #9

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.

0 Likes

(Gerhard Schlager) #10

There was a bug in there after all. It’s fixed.

3 Likes

(Gerhard Schlager) closed #11
0 Likes