Restore Failed: "Some uploads could not be migrated to the new scheme"

I have been trying to do restores from one server to another for a couple of days now. The original server was started back in 2016, so has had some legacy issues. I started to tackle this problem when an old cert expired, and then got bogged down into a range of problems during the backup/restore cycle.

Both the original server and the new server are locked to v2.5, on the stable branch. I also removed some of the plugins that were included, as some posts have alluded to problems with the plugins, and just to isolate any potential issues.

I previously had been having problems with the database, I followed a bunch of the prompts in this post and managed to clean up the offending issues.

However, I am now having problem with S3 during backup. Here is the exception that is causing the restore to fail:

[2020-07-07 17:01:29] Restoring uploads, this may take a while...
[2020-07-07 17:01:29] EXCEPTION: Some uploads could not be migrated to the new scheme. You need to fix this manually.
[2020-07-07 17:01:29] /var/www/discourse/lib/file_store/to_s3_migration.rb:155:in `migrate_to_s3'

It then goes into a rollback cycle and I get an eventual message that the restore has failed.

I have looked at the following posts:

I have not had much luck yet.

Most of my images are already on S3. I believe the issue is from the few remaining images that are on the disk. I can browse through and see a couple of folders (ie. 01, 02, 03, etc), with an odd image here or there. I saw this note about it being fixed in v 2.6.1, so I even tried to update the new server to that to use the fix, but still no luck.

So I have two specific questions:

  1. What do I specifically need to do for the error message “You need to fix this manually.” Is there some process I don’t know about?
  2. Is it possible I am chasing the wrong problem here? ie. is it plausible that the EXCEPTION notice is actually causing the restore failure?
1 Like

Soooo. I’m still stuck on this one. I managed to get my old server up and running again by messing around with putting it behind an nginx server and getting the cert that way (has a different site running on the same domain).

But I would still like to migrate. I’m also afraid I wouldn’t be able to do a restore on the server, should something go wrong.

If there are any other data points I can provide, please let me know!

Have you tried turning off s3 uploads prior to creating the backup?
Just turning off S3 and not rebaking should not do any harm. Then restore and switch S3 back on.

1 Like

Yep, that did it! Wow! That was a much simpler solution than I would have guessed.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.