Every now and then I need to restore the database so that I can troubleshoot some issues in a staging/prod environment. Every time I do this my image references are broken and no images works anymore, not even for products that existed before the restore (and exists in the backup).
Steps to reproduce:
containers are running, Mvc application is not running.
Restoring the Litium database from a file backup in SSMS.
Starts the Mvc application.
Enters BackOffice and rebuilds all elasic indicies.
Is there any steps I have missed or is it not possible to do it this way?
Is it even possible to persist images this way?
Yes I understand that, but as I wrote in the question I thought that the products that existed before the restore should work after, but that’s not true. I know that all newer products has missing images but the old once is still present in the media folder. The only thing that has changed is the database.
Unfortunatly the redis prefix bump didnt work. Im about to do some more investigating in the db to pinpoint the issue. Must be that the paths for the images have changed or something.
If you have an previous copy of the storage/media folders it may be that the images that you see missing is new or changes from when you was copying these folder the last time.
Try to download the storage/media folders again to see that all files are there. Also ensure that the configuration pointing to the correct folder and if the folder is on a shared server ensure that the account the site is running below hav access to the folder as well.