Backup link send to mail failed to download

AI-generated summary

Backup link send to mail failed to download

A discussion about an issue with downloading backups from links sent via email. Pravi reported receiving a blank white page with an error log indicating a missing template. Wseries experienced a similar issue and found a workaround by manually downloading the backups via SFTP.

Pravi discovered that the download link only works immediately after receiving the email and expires after a couple of hours. techAPJ clarified that the token expires as a security measure, and the white-page error is a bug. A fix has been implemented via a commit on GitHub.

Hello Guys,

I have tried to download backup of my site couple of times, but the link send to mail failed to download every time. The link just showed a blank white page. The error logs shows following errors:

ActionView::MissingTemplate (Missing template admin/backups/show, admin/admin/show, application/show with {:locale=>[:en], :formats=>[:gzip], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby]}. Searched in:
  * "/var/www/discourse/app/views"
  * "/var/www/discourse/plugins/docker_manager/app/views"
)
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionview-5.1.4/lib/action_view/path_set.rb:46:in `find'

Although I haven’t checked my error logs, I appear to be having the same issue. I just tried to download a backup from the link provided in the email and got a white page and no downloaded file.

As a workaround I downloaded them manually via SFTP after finding the backup files located in /var/discourse/shared/standalone/backups/default.

Can you repro this @techapj?

@codinghorror
For fresh manual back up, the download link works fine. You have to download it immediately and if failed to download with in a couple of hours, then it wont work. Not sure weather its a security measure or a Bug!!

Yeah, as soon as the download is started the token expires (as a security measure). The error (white-page) you are seeing is a bug, instead a proper error message should be displayed. Fixed via:

https://github.com/discourse/discourse/commit/ed4b845930e0893fe5c1eab1849b7c92c23c7da8