Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. Since update to v8.2.1 backups fail with "Too many empty directories"

Since update to v8.2.1 backups fail with "Too many empty directories"

Scheduled Pinned Locked Moved Solved Support
backupsrsync
38 Posts 11 Posters 6.6k Views 9 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SebGG
    wrote on last edited by
    #29

    ok, great!

    1 Reply Last reply
    0
    • nebulonN nebulon referenced this topic on
    • girishG girish

      @SebGG this is normal behavior starting from 8.2 . we put this check in place to prevent backup or app data corruption .

      • Too many empty folders. This means that something suspect is going on with the app . When you create too many empty dirs, you run out of inodes over time and this leads to fs corruption. Since empty dirs don't show up in du listings, people wonder why fs is becoming fullish when files are not taking space

      • Too many executables. This is a security issue if data files are executable. In most cases, this is because user used a tarball which had incorrect permissions inside it . Or the mount permissions or wrong.

      So, the backup failure is a way for end users to check on both the things above.

      J Online
      J Online
      jagan
      wrote on last edited by
      #30

      @girish Hi Girish, I have this 'too many empty directories' issue on one of my Nextcloud instance and I haven't a clue how to deal with it. My last backup was on 6 Jan and I am getting nervous about it. Cloudron means I don't have to worry about backups, and lately, I an getting sleepless about this.

      Can you please add an override for this error? Not having backups is IMHO, a more serious issue for me than any empty directories.

      Also, running the command shows me directories that clearly are not empty in anyway. I don't know what else to do - I can't delete these directories precisely because they are not empty.

      Any other pointers would be very helpful!

      1 Reply Last reply
      1
      • J Online
        J Online
        joseph
        Staff
        wrote on last edited by
        #31

        @jagan can you check the output of command find /app/data -type d -empty | wc -l in Web Terminal of nextcloud . If that is not a high number, then can you try back up again? The code is simply running that command and concluding the number is too high.

        imc67I jdaviescoatesJ M 3 Replies Last reply
        0
        • J joseph

          @jagan can you check the output of command find /app/data -type d -empty | wc -l in Web Terminal of nextcloud . If that is not a high number, then can you try back up again? The code is simply running that command and concluding the number is too high.

          imc67I Online
          imc67I Online
          imc67
          translator
          wrote on last edited by imc67
          #32

          @joseph said in Since update to v8.2.1 backups fail with "Too many empty directories":

          @jagan can you check the output of command find /app/data -type d -empty | wc -l in Web Terminal of nextcloud . If that is not a high number, then can you try back up again? The code is simply running that command and concluding the number is too high.

          just curious, I don't have a backup issue but executed the command in web terminal NC: 12471 is this high?

          and Immich: 26423

          jdaviescoatesJ 1 Reply Last reply
          1
          • imc67I imc67

            @joseph said in Since update to v8.2.1 backups fail with "Too many empty directories":

            @jagan can you check the output of command find /app/data -type d -empty | wc -l in Web Terminal of nextcloud . If that is not a high number, then can you try back up again? The code is simply running that command and concluding the number is too high.

            just curious, I don't have a backup issue but executed the command in web terminal NC: 12471 is this high?

            and Immich: 26423

            jdaviescoatesJ Online
            jdaviescoatesJ Online
            jdaviescoates
            wrote on last edited by
            #33

            @imc67 said in Since update to v8.2.1 backups fail with "Too many empty directories":

            just curious, I don't have a backup issue but executed the command in web terminal NC: 12471 is this high?

            You made me curious too!

            I seem to have 31267 (but also not currently having any backup issues either)

            I use Cloudron with Gandi & Hetzner

            1 Reply Last reply
            0
            • J joseph

              @jagan can you check the output of command find /app/data -type d -empty | wc -l in Web Terminal of nextcloud . If that is not a high number, then can you try back up again? The code is simply running that command and concluding the number is too high.

              jdaviescoatesJ Online
              jdaviescoatesJ Online
              jdaviescoates
              wrote on last edited by
              #34

              @joseph said in Since update to v8.2.1 backups fail with "Too many empty directories":

              If that is not a high number,

              Define high?

              @joseph said in Since update to v8.2.1 backups fail with "Too many empty directories":

              The code is simply running that command and concluding the number is too high.

              How does the code define it?

              I use Cloudron with Gandi & Hetzner

              1 Reply Last reply
              0
              • girishG Do not disturb
                girishG Do not disturb
                girish
                Staff
                wrote on last edited by
                #35

                The number are just some pragmatic values. Empty dirs - 50000 , executables - 20000 and symlinks - 20000 . If it exceeds these, it will error.

                1 Reply Last reply
                0
                • J joseph

                  @jagan can you check the output of command find /app/data -type d -empty | wc -l in Web Terminal of nextcloud . If that is not a high number, then can you try back up again? The code is simply running that command and concluding the number is too high.

                  M Offline
                  M Offline
                  mononym
                  wrote last edited by mononym
                  #36

                  @joseph I hit 50968 empty directories 😕 Is there a way to solve this as it hinders proper backup processes ? Thanks

                  P.S.: I think the issue is discussed here: https://github.com/nextcloud/server/issues/46425

                  Edit: I deleted the content of the preview folder with rm -r app/data/appdata_*/preview/* and then ran sudo -u www-data php -f /app/code/occ files:scan-app-data as suggested in the link above. Ended up with 129 empty directories.

                  1 Reply Last reply
                  3
                  • J Online
                    J Online
                    joseph
                    Staff
                    wrote last edited by
                    #37

                    @mononym I recently had to clean up a customer's server . The preview dir had over 230k empty dirs!

                    # wc -l /tmp/deleted_dirs.txt 
                    231605 /tmp/deleted_dirs.txt
                    
                    J 1 Reply Last reply
                    3
                    • J joseph

                      @mononym I recently had to clean up a customer's server . The preview dir had over 230k empty dirs!

                      # wc -l /tmp/deleted_dirs.txt 
                      231605 /tmp/deleted_dirs.txt
                      
                      J Online
                      J Online
                      jagan
                      wrote last edited by
                      #38

                      @joseph Yep, this was my installation 🤡

                      Thank you very much @joseph can't thank you enough.

                      1 Reply Last reply
                      1
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Bookmarks
                      • Search