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:
- Uploads migration to S3 fails
- How can I migrate files from the old upload scheme (default/XXX) to the new one (default/original/{1,2}X)?
- Rake uploads:migrate_to_s3 runs forever
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:
- 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?
- Is it possible I am chasing the wrong problem here? ie. is it plausible that the EXCEPTION notice is actually causing the restore failure?