I have issue with badge section, i have modified some badges and add some images there; after 6 months i restore a backup and everything works fine execpt the badge section; i try to login with safe-mode and disable all plugins… but issue still same, how can i restore the badge sections withd default name and images ?
Out of the box, there is no way to “make reset for badge images” that I know of.
What I’d do first is check that the badges missing images were at least restored. If you check the badges table you can get the ID of the image at the image_upload field. Then use that ID in the uploads table, to get the URL of the image, like so:
select url from uploads where id = <badge-upload-id>
The URL looks something like this: /uploads/default/original/1X/c1325294cd04ae6e9072a2577543dad66cf31afe.jpeg and from there, you can extract the name of the file, in this case it would be c1325294cd04ae6e9072a2577543dad66cf31afe.jpeg
Then you can check in the server that the image is there with find or whatever method you prefer
cd /
find . -name c1325294cd04ae6e9072a2577543dad66cf31afe.jpeg
Once you made sure the images were restored, at the right path, then you can continue debugging as the issue is somewhere else.
The version of Discourse from the backup is too different from the version of Discourse you are restoring into?
Maybe someone else in the community knows more about this, though.
Follow the instruction here Discourse Data Explorer to install the data explorer plugin, you can use it to inspect the badges table. Focus on your custom badges.