Herstellen van oude multisite-installatie mislukt

AI-generated summary

A user reports an issue restoring a backup from a multisite Discourse installation to a standalone server, where uploads are present in the backup but not restored to the filesystem. The restored site references old multisite paths (e.g., /uploads/secondsite/), suggesting the files were not correctly placed. The user confirms the files are in the backup archive but fail to appear on the new server. Others suspect a bug, with one user offering to examine the backup file and another pointing to the relevant code in uploads_restorer.rb. The discussion highlights a potential regression in the restore process for multisite backups.

Has something changed in the restore process which would affect backups from multisite environments?

Attempted to move a site between servers today. Old server was a multisite install, with nginx in front handling HTTPS encapsulation and force_https is turned on.

New server is a standalone version of the standard install, using Let’s Encrypt.

Checking the backup file the original uploads are present, but they don’t appear to be restored to the filesystem on the new server. References to images across the site refer to the old multisite ‘secondsite’, so paths point to /uploads/secondsite/original rather than /uploads/default/original.

Attempted restore via gui, and command line for good measure. Plan to dig into this further, but figured it was worth posting in Support for now and will move to Contribute > Bug if someone can confirm this is still a supported scenario.

This is something that previously worked, but I’ve not done it for at least a year, maybe longer.

So the files are there but in the wrong place? And the database points to default rather than secondsite? Sounds like a bug, but I guess you can just rename the directory? Or did the backup not include the uploads at all?

They’re in the backup archive, but never make it to the filesystem.

That’s bizarre! Does sound like a bug. And neither system has S3 uploads configured?

Correct. I’ll do some more testing later.

That’s unexpected. Any chance I can have a look at the backup file? Otherwise, if you want to debug this yourself, take a look at discourse/lib/backup_restore/uploads_restorer.rb at main · discourse/discourse · GitHub.

The willingness of @team to poke into stuff like this is really awesome. @tgxworld helped me resolve an edge case issue last week. :tada: