Attachments in filesystems are not deleted by Cleanup2

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • LemonMiao
    New Member
    • Sep 2018
    • 24
    • 5.3.x

    [Bug / Issue] Attachments in filesystems are not deleted by Cleanup2

    Hello, I'm back to talk about my problem, after opening a ticket to the support, no one was able to find the problem, even with access to the dedicated server.
    I paid a system administrator and a php programmer, and they can not find the problem.
    The question I was asked, and that I turn to you, is: where in the cleanup2.php is the function of deleting files from the filesystem? Where can I direct them to find the error?

    Thank you.
  • Wayne Luke
    vBulletin Technical Support Lead
    • Aug 2000
    • 74132

    #2
    cleanup2.php deletes the attachment records from the database. Line 37 - // Unused filedata is removed after 12 hours.

    It is more than 2/3rds of the actual code in the file. There is no code in this file to delete attachments from the disk. Seems like a bug. I guess no one else actually cares if the file gets deleted or not.

    I've created a bug report - https://tracker.vbulletin.com/vbulle...sues/VBV-18892
    Last edited by Wayne Luke; Tue 23 Oct '18, 2:22pm.
    Translations provided by Google.

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

    Comment

    • LemonMiao
      New Member
      • Sep 2018
      • 24
      • 5.3.x

      #3
      Originally posted by Wayne Luke
      I guess no one else actually cares if the file gets deleted or not.
      I imagine that not everyone has 4 million attachments on their forum.
      And I realized it only because I deleted over 200 thousand threads after going to vb5.

      Originally posted by Wayne Luke
      I hope there is also a function to delete all orphaned files deleted from the database and not from the filesystem.
      thanks

      Comment

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

        #4
        Originally posted by LemonMiao
        I hope there is also a function to delete all orphaned files deleted from the database and not from the filesystem.
        thanks
        I've asked for an offline script for the command line that can do this.

        Translations provided by Google.

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

        Comment

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

          #5
          Please backup your attachment directory and use the attached file to delete those without a database record. There is a .md file with the instructions in the zip file.

          How to use this file
          1. Place this file in your /core directory.
          2. Run from the command line: php cleanfiledata.phar --source=source\dir --target=targetdir
          3. Replace your source directory with the target directory
          Attached Files
          Translations provided by Google.

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

          Comment

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