Error: Can't notify admin while restoring backup during a migration to a fresh install

Continuing the discussion from Move your Discourse Instance to a Different Server:

after installing discourse on a new server, registering a new admin (with the same username as the old admin), and restoring backups, everything goes well till the end, and then I got this error:

[2020-01-24 07:06:47] Notifying 'padpors' of the end of the restore... [2020-01-24 07:06:47] Something went wrong while notifying user.

as a result the backup can not be restored.

1 Like

I got another backup from the site, and tried to restore it via terminal using this howto: Restore a backup from command line. but then at the end of the restore, I got the same error in the terminal:

Notifying 'system' of the end of the restore...
Something went wrong while notifying user.
Restore done.

since the backups were fine, I guess this is a bug.


@gerhard any idea what might be causing this issue?


There have been lots of changes to backup/restore code lately. Are you on latest?


I see this error all the time as well.
BUT… this error happens after the restore, and it finishes with SUCCESS. So it is an error, but it is certainly not causing restores to fail.

Unpausing sidekiq...
Marking restore as finished...
Notifying 'DHSupport' of the end of the restore...
Something went wrong while notifying user.

Are you sure there is not an error higher up?


Looked into this a bit further.

#<NoMethodError: undefined method `join' for nil:NilClass>
     lib/discourse.rb:45:in `pretty_logs'
     /var/www/discourse/lib/backup_restore/restorer.rb:134:in `notify_user'

Seems like @logs is not initialized?


Yes, it is a very fresh install and updated install on both instances.

No other errors upward, but I will check again to be sure.

1 Like

you were right, here is the previous error:

ERROR:  could not create unique index "index_tags_on_lower_name"
DETAIL:  Key (lower(name::text))=(زبا�) is duplicated.
EXCEPTION: psql failed: DETAIL:  Key (lower(name::text))=(زبا�) is duplicated.

which I guess is already reported here: Can't restore due to corrupt indexes (with some clues on how to deal with corrupt indexes) and here There are some duplicated tags I can't merge .