News:

Wondering if this will always be free?  See why free is better.

Main Menu

After backup: images disappeared

Started by Met2018, January 25, 2024, 01:26:14 AM

Previous topic - Next topic

Met2018

Hello,
After a bachup of the forum (2.0.19) some of the pictures disappeared. Instead of the image, only the file name is displayed, and when you click on it, a white page appears with the error message "404 file not found". However, the files are still present in the attachments folder. It affects both new and old images, but images are always displayed correctly in between. No system can be recognized. How can I fix this?
Thank you.

Steve

DO NOT pm me for support!

Doug Heffernan

Backups shouldn't and don't cause loss of data. If you can tell us, as asked above, what method you used to make the backup might help shed some light in this mystery.

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Met2018

I uploaded the files using Filezilla (SFTP). I imported the database tables with phpMyAdmin. Except the 'messages' table, which was too big. I imported them with 'bugdump'.

CRM 114

Quote from: Met2018 on January 25, 2024, 01:26:14 AM..and when you click on it, a white page appears with the error message "404 file not found". However, the files are still present in the attachments folder.

If you download one of those images to your PC (via FTP), can you view it?
German Wet Shaving Forum: www.gut-rasiert.de/forum

Doug Heffernan

Quote from: Met2018 on January 26, 2024, 01:29:22 AMI uploaded the files using Filezilla (SFTP). I imported the database tables with phpMyAdmin. Except the 'messages' table, which was too big. I imported them with 'bugdump'.

So you didn't make a backup only as per your original post. For future reference, it would help if you gave as many details as possible rather than half ones.

Quote from: Met2018 on January 26, 2024, 01:29:22 AMI uploaded the files using Filezilla (SFTP).

Filezilla is known to cause issues with image uploads. Can you try to reupload them again using a different ftp client?

Quote from: Met2018 on January 26, 2024, 01:29:22 AMI imported the database tables with phpMyAdmin. Except the 'messages' table, which was too big. I imported them with 'bugdump'.

Was the database import done thoroughly?

Sono

Recnelty I had a similar problem when moving to new hostings. Happened at 2 different hosting as well. When I copied things back, avatars did not display. I read in a post you need to copy the Attachments folder as binary in Filezilla. I had never done that before. But I moved my forum several times in the past, and never had a problem. During the last 2 times I had. I had to revert to a backup from 2020 for the attachments to be displayed. However, the odd things are:

1. That backup was not copied as binary either back in the days when saved.
2. When I moved my forum 2nd time recently, I backed up the files as recommended: copying the Attachments folder as binary. When I reinstalled the forum from that new backup to the new server, the attachments did not work again. No matter that time the FTP copy happened as recommended, and the source was a working Attachment folder. I had to revert to that backup from 2020 again. Totally crazy, I never saw this happen before.

Met2018

Quote from: CRM 114 on January 26, 2024, 02:50:34 AMIf you download one of those images to your PC (via FTP), can you view it?
Yes, if I add the .jpg file attachment.


Kindred

Your problem is that you didn't backup...  you backed up, then restored to a DIFFERENT LOCATION.

you then did not correctly run repair_settings.php.

You need to run TWICE.
Once gets the database and baseline URLs and paths.
The second time corrects the theme, attachments,  avatars and smilies.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Met2018

Good news: the pictures are back. :D

Sono put me on the right path. Thank you very much!

That gave me the idea to compare an old backup of my /attachments/ folder with the current one. I discovered that in the old backup all the files had no extension after their cryptic name. In the current folder, most of the files had the extension .dat. And exactly these were not shown. After I removed the ending from one as a test, the corresponding image was there again.

So I removed the .dat extension from all files and the images are all displayed correctly again.

Thank you to everyone who helped.

Arantor

That sounds like a 2.1 backup shoved into a 2.0?

Doug Heffernan

Glad to see that you got it fixed. Marking this as solved.

Kindred

yeah -- it sounds like you did an upgrade, took a backup and then tried to copy the (2.1.x) backup into a 2.0.x installation.

If so -- then you are going to have MANY MANY more issues soon.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Met2018

Yes, I tested an update to 2.1.4. I previously made a backup of 2.0.19. Then created a subfolder in the SMF folder and a new database. I only carried out the update in this subfolder.
My mistake was that I pointed the new version to the old /attachments/ folder. Since it is quite large and contains over 90,000 files, I wanted to avoid copying it into the subfolder. I didn't know that the file names would be changed. Now I'm smarter.
Since everything else except the /attachments/ folder only happened in the subfolder, I think that 2.0.19 is not otherwise affected.

Thank you again for your help.

Advertisement: