Why won't my remote backups restore?

AI-generated summary

Brandon007 encountered issues restoring remote backups after migrating servers, receiving an error: “EXCEPTION: Failed to download archive to tmp directory.” Despite successful backup creation using BackBlaze, restoration via Discourse’s UI failed. As a workaround, Brandon007 attempted local restores but initially failed because Safari auto-opened and renamed .tar.gz files to .tar, breaking the restore. After disabling Safari’s auto-open setting and re-downloading the correct .tar.gz file, local restoration succeeded. pfaffman questioned if disk space was the issue, but Brandon007 confirmed 20GB was available. pfaffman then asked why Brandon007 was manually downloading via Safari instead of letting Discourse pull from S3 directly. Brandon007 clarified these were two separate issues: the first involved remote restoration via Discourse UI failing, and the second involved manually downloading backups locally as a fallback, which only worked after fixing the file extension issue. The root cause of the remote restore failure remains unresolved, though local restoration became viable after correcting Safari’s behavior.

I migrated servers last night and just could not get the remote backup to restore.

Instead, I was presented with this error in the backup log.

Remote Backups

EXCEPTION: Failed to download archive to tmp directory.

I tried over and over, and nothing worked. I can make backups successfully, I just cannot restore from those remote backups. I’m using BackBlaze, and this is what my app.yml file looks like.

DISCOURSE_S3_ENDPOINT: <url>
DISCOURSE_S3_ACCESS_KEY_ID: <key_id>
DISCOURSE_S3_SECRET_ACCESS_KEY: <key>
DISCOURSE_S3_BACKUP_BUCKET: <bucket>

I hope someone has some insight here…

Local Backups

Here’s a tip for someone else…

I then tried local backups. A long story short, they didn’t work, and that’s when I noticed the backup file ended in .tar instead of .tar.gz. As it turns out, as soon as the backup is downloaded, Safari was opening the archive file which changes the file extension from .tar.gz to .tar. So that’s why local backups were not restoring.

So I unchecked this box:

Re-downloaded my backup file from BackBlaze and the .tar.gz file extension was intact. From there, the restore worked as expected.

Is your disk full?

No, there’s 20GB avalible.

Wait. Why are you downloading with safari and not letting discourse pull the backup from s3?

Two separate issues.

In the first instance, I was trying to restore from a BackBlaze backup, via the Discourse UX. I could see the backup files within the Discourse UX. However, when I click “Restore,” with it enabled in Discourse, the backup failed to restore for the reason cited above.

The second issue, since the first failed, was me restore locally, which is the only option that did work.