Automatically remove orphaned attachments

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Big Dan
    Senior Member
    • Jun 2006
    • 137
    • 4.2.X

    [Forum] Automatically remove orphaned attachments

    Hi,

    I'm running 4.1.10 suite and just deleted a forum containing a good number of threads with attachments. My attachments directory is still the same size according to du -h despite manually running all of the hourly clean up tasks. Is there any way to automatically remove orphaned attachments? No use wasting storage space.

    Thanks,
    Dan Hutter.
  • Wayne Luke
    vBulletin Technical Support Lead
    • Aug 2000
    • 74161

    #2
    Maintenance -> Update Counters / General Update Tools -> Remove Orphaned Threads.

    Attachments not assigned to other content should be deleted automatically after about an hour.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment

    • Big Dan
      Senior Member
      • Jun 2006
      • 137
      • 4.2.X

      #3
      Thanks Wayne that didn't appear to work my attachments directory is still 4.1G. I'll give it another try in the morning maybe a task will run over night.

      Comment

      • Wayne Luke
        vBulletin Technical Support Lead
        • Aug 2000
        • 74161

        #4
        You can run the Cleanup 2 scheduled task manually in the Scheduled Task Manager.
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud demonstration site.
        vBulletin 5 API

        Comment

        • Big Dan
          Senior Member
          • Jun 2006
          • 137
          • 4.2.X

          #5
          Wayne, I ran the hourly clean up 1 and 2. I even ran regenerate thumbnails hoping the system would recognize some of the files it's scanning are unattached to posts but no dice.

          It's no big deal just trying to keep things tidy, I read a couple of other threads that this may be a bug with file system storage.

          Comment

          • Andy
            Senior Member
            • Jan 2002
            • 5886
            • 4.1.x

            #6
            Originally posted by Big Dan
            Thanks Wayne that didn't appear to work my attachments directory is still 4.1G.
            If you're only looking at the attachments directory size that's not a good way to determine if there are any orphaned attachments.

            Comment

            • Big Dan
              Senior Member
              • Jun 2006
              • 137
              • 4.2.X

              #7
              Originally posted by Andy
              If you're only looking at the attachments directory size that's not a good way to determine if there are any orphaned attachments.
              Huh? I know there are orphaned attachments as I deleted a forum containing several threads with a couple hundred or so image attachments. The directory is the same size before and after deleting the forum.

              Comment

              • Wayne Luke
                vBulletin Technical Support Lead
                • Aug 2000
                • 74161

                #8
                Originally posted by Big Dan
                Huh? I know there are orphaned attachments as I deleted a forum containing several threads with a couple hundred or so image attachments. The directory is the same size before and after deleting the forum.
                Deleting threads with attachments doesn't actually mean the attachments are orphans. Once uploaded, they can be reused in other content like Photo Albums, Member Groups and other threads.
                Translations provided by Google.

                Wayne Luke
                The Rabid Badger - a vBulletin Cloud demonstration site.
                vBulletin 5 API

                Comment

                • Big Dan
                  Senior Member
                  • Jun 2006
                  • 137
                  • 4.2.X

                  #9
                  Originally posted by Wayne Luke
                  Deleting threads with attachments doesn't actually mean the attachments are orphans. Once uploaded, they can be reused in other content like Photo Albums, Member Groups and other threads.
                  Ahh, that explains it. Is there any automated way to remove attachments that aren't currently attached to a post, blog, or CMS content?

                  Comment

                  • Wayne Luke
                    vBulletin Technical Support Lead
                    • Aug 2000
                    • 74161

                    #10
                    Originally posted by Big Dan
                    Ahh, that explains it. Is there any automated way to remove attachments that aren't currently attached to a post, blog, or CMS content?
                    Unfortunately, no.
                    Translations provided by Google.

                    Wayne Luke
                    The Rabid Badger - a vBulletin Cloud demonstration site.
                    vBulletin 5 API

                    Comment

                    • Big Dan
                      Senior Member
                      • Jun 2006
                      • 137
                      • 4.2.X

                      #11
                      Originally posted by Wayne Luke
                      Unfortunately, no.
                      Okay. Thanks for your time anyway.

                      Comment

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