The user sqdz reports a 404 error when trying to download a Discourse backup via a link sent by email, with the link containing an unusual double dot (..) in the filename. The backup is stored in /var/discourse/shared/standalone/backups/default. gerhard and ClawdiaWolf note the oddity of the double dot and speculate it might be due to email manipulation or a configuration issue. sqdz later resolves the issue by rebuilding the container after updating their subdomain, suggesting the problem was related to a misconfigured or outdated setup.
Issue:
After generating a backup, receiving the link to download it by email, I’m redirecting to a 404 page.
Few minutes later, if I use the same link I’m receiving Sorry, this backup download link has already been used or has expired.
Step to reproduce
Install Discourse for Docker
./discourse-setup
Go to the Admin panel, Backups tabs and create a Backup. (backups are saved in local storage)
The new backup generated will appear in the list
Click on Download , and you will receive A link to download this backup has been emailed to you.
You will receive an email like this:
Here’s the site backup download (https://discourse.XXX.com/admin/backups/XXX-2023-03-15-145648-v20230308042434..tar.gz?token=<MyToken>) you requested.
After clicking on the link, I’m facing to a blank page with a 404.
If I right click to save the link, it will download a corrupted zip file.
That’s weird! Where’s the second dot coming from? I can’t reproduce the issue and I’ve never seen that behavior before. So, I don’t have an explanation for it. Any chance that something manipulates the link in your email?
Here's the [site backup download](%{backup_file_path}) you requested.
We sent this download link to your validated email address for security reasons.
(If you *didn't* request this download, you should be seriously concerned -- someone has admin access to your site.)
I installed Discourse yesterday from this Git repositroy, and I followed this guide
I’ve seen this before on a friend’s instance, never did figure out the root cause though. It did it for about a month and then after a CLI rebuild of the container it stopped doing it.
Just to make you aware, I needed to update my subdomain, so I rebuild the container (as recommended by Claudia) and it fixed the double dots issue in the mail.