No announcement yet.

Upgrade 4.2.1 to 5.0.3 attachments are gone

  • Filter
  • Time
  • Show
Clear All
new posts

  • Upgrade 4.2.1 to 5.0.3 attachments are gone

    I upgraded my VB from 4.2.1 to 5.0.3 via command line, now all the "old" attachments are not recognized, attachment statistics in admincp says 3.34 MB, but it should be about 4.8GB
    The storage path is set correct, directory and all subs has 777 permission. I also checked the DB Table attachment, all ID's and filenames of the "old" attachment are there.

    The mystery is, adding a new attachment to posts works fine.

  • #2
    Did you move servers, or anything prior to the upgrade?

    Do you have a backup from before the upgrade?


    • #3
      Of course, I have a SQL Dump of 4.2.1.I didn't move anything, V5 is installed in a subdirectory named vb5, the path to attachment directory is still the same like
      in V4. In V4 attachments worked fine.


      • #4
        So your attachments are stored in the filesystem and you had a full path entered into the field for the path to the attachments? Can you still see those attachments (via direct url)?

        Please don't PM or VM me for support - I only help out in the threads.
        vBulletin Manual & vBulletin 4.0 Code Documentation (API)
        Want help modifying your vbulletin forum? Head on over to
        If I post CSS and you don't know where it goes, throw it into the additional.css template.

        W3Schools <- awesome site for html/css help


        • #5
          Originally posted by Lynne View Post
          So your attachments are stored in the filesystem and you had a full path entered into the field for the path to the attachments? Can you still see those attachments (via direct url)?
          Ok, this took quite some time to figure out - there appears to be a bug in the upgrade process between v3 and v4 (since we're updating vom v3 to v5, we're crossing that territory).
          The attachments themselves are all physically where they are supposed to be - no trouble with that.
          We thought, the problem is limited to v5, but that is not necessarily true, because:

          right after conversion, everything works fine. But after some time, suddenly, attachments are no longer available. This happened pretty fast at first, so we didn't notice the delay.

          The actual trouble is: the table filedata contains nearly 18000 entries, 100 of them have a contenttypeid 8 (Album), the rest is 1 (Post).

          When attachments start disappearing, all that is left, are the 100 Album pictures.

          The reason: the upgrade converter left the refcount field of all post attachments 0 (album attachments 1).

          Later, cron/cleanup2.php does its thing and kills those entries, so 17000 attachments are lost!

          For now we fixed this by manually setting refcount=1, please let me know if there is anything else we'd need to consider.

          There is a lot of redundant information in the tables attach and attachment. Are these still being used by vB5? If so: that cron cleanup is not being very thorough, because our 17000 attachments got removed from filedata, but not from those other tables.
          Last edited by Penguins-Attack; Fri 26 Jul '13, 4:14am.


          • #6
            Nothing? A comment maybe?


            • #7
              Hi pinguin attack This looks like my issue : I am interested in the fix


              • #8
                I know we're trying to get someone to look into this sooner rather than later. Keep an eye on the bug.


                • #9
                  Fine, thank you Zachery & thank you penguins-attack for the description/analysis


                  • #10
                    I seem to be having this problem. Are you saying you LOST the attachments, i.e., they are no more?

                    And where exactly do you make this manual change: refcount=1?
                    Last edited by tonmo; Sat 10 Aug '13, 6:27pm.


                    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.