Advertisement:

Author Topic: Help! Moved to a new host and attachments/uploaded avatars disappeared  (Read 714 times)

Offline GunDude

  • Semi-Newbie
  • *
  • Posts: 40

Just moved to a new host, but all attachments and uploaded avatars disappeared.... I've read tons of threads about ASCII file types and such when FTP'ing, but I downloaded the attachments folder from cPanel NOT FileZilla or anything like that. 

Is there a way to get those files to re-associate with posts and avatars to users? 

I've spent two hours searching and can't find a solution.

Thanks in advance!

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 50,843
did you fix your file paths using repair_settings.php?

Offline GunDude

  • Semi-Newbie
  • *
  • Posts: 40
Yes, all path's are correct.

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 50,843
how did you move the forum to the new server? please explain step by step.

Offline GigaWatt

  • The Smiley Guy
  • Support Specialist
  • SMF Hero
  • *
  • Posts: 2,045
  • Gender: Male
    • Macedonian electronics forum
How are user's avatars and attached files viewed in a browser? Do attached files appear as attachments (paperclips) within a post when viewing that post? What happens if you click on the paperclip (attachment)?
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Offline GunDude

  • Semi-Newbie
  • *
  • Posts: 40
how did you move the forum to the new server? please explain step by step.
Well, I was one of two people working on the move... since the forum was hosted in an account I had for years, running SMF for this group.  The new hosting account is owned by the group now and he's the admin.

From cPanel, I performed backups in both phpMyAdmin and Backup Wizard.

In mpPHPadmin: by selecting the proper structure on the left, then going to Export, leaving method on Quick, dropdown on SQL, and clicking GO.
then in Backup Wizard: Did a backup (partial) of MySQL Databases and selected the right database.

Both of these files were put in Dropbox and shared with him.

Unfortunately, on the restore side -- I don't know (yet) what my colleague did to restore the forum. I'll have to find that out.

Everything looked great til I noticed the attachments were just not showing at all in posts, and no avatars were there. 

This is when I went in again thru cPanel File Manager and found the appropriate attachments folder (verified in the old forum) as being correct, and compressed and downloaded all the files.  Those were sent to my colleague who uploaded them to the attachments folder, verified the path was correct in repair_settings.php

Still, no attachments show.  Running a validation/repair on the new forum showed no errors... I was hoping this would re-attribute those files to users and posts.


Offline GunDude

  • Semi-Newbie
  • *
  • Posts: 40
How are user's avatars and attached files viewed in a browser? Do attached files appear as attachments (paperclips) within a post when viewing that post? What happens if you click on the paperclip (attachment)?

Normally they show up as thumbnails in the post with a paperclip.  They are just non-existent on the newly moved forum.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,269
  • Gender: Male
    • Kindred-999 on GitHub
you backed up the database and installed it on the new server...   did you *ALSO* back up the **FILES** and move them to the new server?

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

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,019
If you can pm cpanel access (url/user/pw) I'll have a look.

Offline GunDude

  • Semi-Newbie
  • *
  • Posts: 40
you backed up the database and installed it on the new server...   did you *ALSO* back up the **FILES** and move them to the new server?

(php and other files, not database files)

No, there was a fresh install of the SMF forum on the new server where the database was restored to.  Mods were then done on the new (there were only a handful).

Offline GunDude

  • Semi-Newbie
  • *
  • Posts: 40
If you can pm cpanel access (url/user/pw) I'll have a look.
I have yet to get cPanel access on the new server.  The other person is the admin and so far the details he's sent me hasn't worked.  I guess he's been unsuccessful in adding me as a cPanel user.  Once I get access, I'll set up a screen share or something with you... thanks for offering.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,019
Was the forum at 2.0.15 before the move, or has it been upgraded since?

Offline GunDude

  • Semi-Newbie
  • *
  • Posts: 40
It was (and is) 2.0.15.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,269
  • Gender: Male
    • Kindred-999 on GitHub
you backed up the database and installed it on the new server...   did you *ALSO* back up the **FILES** and move them to the new server?

(php and other files, not database files)

No, there was a fresh install of the SMF forum on the new server where the database was restored to.  Mods were then done on the new (there were only a handful).


Everyone else can stop trying to help...    He has just told us the EXACT problem.

If you did not back up and restore the actual FILES, then you did not transfer the attachments or avatars. period.

The only way to get them is to go back and get the *FILES* from your original server
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline GunDude

  • Semi-Newbie
  • *
  • Posts: 40
Quote
Everything looked great til I noticed the attachments were just not showing at all in posts, and no avatars were there. 

This is when I went in again thru cPanel File Manager and found the appropriate attachments folder (verified in the old forum) as being correct, and compressed and downloaded all the files.  Those were sent to my colleague who uploaded them to the attachments folder, verified the path was correct in repair_settings.php

Still, no attachments show.  Running a validation/repair on the new forum showed no errors... I was hoping this would re-attribute those files to users and posts.

Originally yes, when the database was restored.. the attachments weren't there.  But, I saw the error of my ways and went and got them as described and he uploaded them to the attachments folder.

How can you get them to re-attribute them to posts if the files are there but the forum doesn't see them?

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,269
  • Gender: Male
    • Kindred-999 on GitHub
did you run some sort of correction (like correct forum errors) when the files were missing?   If so, then the ONLY way to recover them to the threads and avatars is to restore the old database on the new server again.

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

Offline GunDude

  • Semi-Newbie
  • *
  • Posts: 40
did you run some sort of correction (like correct forum errors) when the files were missing?   If so, then the ONLY way to recover them to the threads and avatars is to restore the old database on the new server again.
I think I did, prior to realizing these files were not there.

Anything else to know or just do a restore like previously and if the attachments are there we should be good?
Are there any other files that would need to be moved manually with what I described?

Thanks for your help. Sounds like you got to the bottom of it.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 9,019
If you have a good db backup from original forum, and all files are present on new server, import the backup, run repair_settings, and it should be good.

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 50,843
you would loose any posts/topics/members if any were made on the new location if you do that but it is the only way to get the attachments back.

Online Bigguy

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,913
  • Gender: Male
  • Be nice, or else....
    • smfbigguy on GitHub
    • What's Ur Beef
Is there not file maintenance under Attachments and avatars in the admin panel. Has that been run yet. ??

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,269
  • Gender: Male
    • Kindred-999 on GitHub
That's the problem... he ran it when the files were missing -- the system detected that the files were missing and removed all attachments and avatars.

The ONLY way to restore the information is to restore the database with the correct information still in it.

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

Offline GunDude

  • Semi-Newbie
  • *
  • Posts: 40
Is there not file maintenance under Attachments and avatars in the admin panel. Has that been run yet. ??

There is, but it actually made my problem worse.  Not realizing the attachments weren't there, that was run which removed the associations.  Now, we have to re-import the database, and hopefully they will be there.

Offline GigaWatt

  • The Smiley Guy
  • Support Specialist
  • SMF Hero
  • *
  • Posts: 2,045
  • Gender: Male
    • Macedonian electronics forum
Delete everything, import old DB, import all files from backup (all of them), run repair_settings.php?, correct URLs, paths, etc., load forum URL in browser, check if the forum is loading, if the attachments show up in posts and see if you can download them ;).

You can worry about the details later, just make sure the forum is up and running ;).

PS: When uploading the files, if you're doing it via FTP, make sure you have the FTP client set up in binary mode.
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Offline GunDude

  • Semi-Newbie
  • *
  • Posts: 40
Thanks everyone for your help... It's up and working with attachments and all after re-uploading the backup.