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
  • 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
35 Posts 10 Posters 3.1k Views 8 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.
  • girishG girish

    @jagan can you check why you have so many executable files? If you run find /home/yellowtent/appsdata/8679c3b3-59b6-4d7e-a84a-d11dab4d5a19 -type f -executable it will give you a list of executable files. Usually, app data should not contain so many executables.

    J Offline
    J Offline
    jagan
    wrote on last edited by jagan
    #15

    @girish I did run that, and got a very long list of files - php, png, svg on a wordpress site along with all the plugins.

    8fa600e9-45d8-421a-9c8c-ae223e3bd25b-image.png

    Absolutely no idea how to proceed.

    But for now, I will disable the apps shown the list and try, thank you!

    girishG 1 Reply Last reply
    0
    • girishG girish

      @shrey you can disable immich backups and then the system backup will succeed. System backup === a backup that you can use to restore on another system . If one or more apps fail, it won't finish, this is just be design.

      Did you find out what those empty folders are? Which paths inside immich are they in?

      S Offline
      S Offline
      shrey
      wrote on last edited by shrey
      #16

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

      you can disable immich backups and then the system backup will succeed.

      Yeah, that's the workaround i ended up with for now.

      But i would really like to get my Immich start updating again (without compromising on the backup process). It's already 3 versions behind.


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

      Which paths inside immich are they in?

      find /mnt/immich/i -type d -empty
      
      /mnt/immich/i/upload/upload/b4fe288d-66ef-42ac-b74a-14ec12220a71/82/c7
      /mnt/immich/i/upload/upload/b4fe288d-66ef-42ac-b74a-14ec12220a71/82/96
      /mnt/immich/i/upload/upload/b4fe288d-66ef-42ac-b74a-14ec12220a71/82/01
      /mnt/immich/i/upload/upload/b4fe288d-66ef-42ac-b74a-14ec12220a71/82/09
      /mnt/immich/i/upload/upload/b4fe288d-66ef-42ac-b74a-14ec12220a71/82/36
      /mnt/immich/i/upload/upload/b4fe288d-66ef-42ac-b74a-14ec12220a71/82/2c
      /mnt/immich/i/upload/upload/b4fe288d-66ef-42ac-b74a-14ec12220a71/82/52
      /mnt/immich/i/upload/upload/b4fe288d-66ef-42ac-b74a-14ec12220a71/82/70
      /mnt/immich/i/upload/upload/b4fe288d-66ef-42ac-b74a-14ec12220a71/82/a3
      /mnt/immich/i/upload/upload/b4fe288d-66ef-42ac-b74a-14ec12220a71/82/93
      /mnt/immich/i/upload/upload/b4fe288d-66ef-42ac-b74a-14ec12220a71/82/33
      /mnt/immich/i/upload/upload/b4fe288d-66ef-42ac-b74a-14ec12220a71/82/0b
      /mnt/immich/i/upload/upload/b4fe288d-66ef-42ac-b74a-14ec12220a71/82/b7
      /mnt/immich/i/upload/upload/b4fe288d-66ef-42ac-b74a-14ec12220a71/82/9c
      /mnt/immich/i/upload/upload/b4fe288d-66ef-42ac-b74a-14ec12220a71/82/7d
      /mnt/immich/i/upload/upload/b4fe288d-66ef-42ac-b74a-14ec12220a71/82/3e
      /mnt/immich/i/upload/upload/b4fe288d-66ef-42ac-b74a-14ec12220a71/82/7c
      /mnt/immich/i/upload/upload/b4fe288d-66ef-42ac-b74a-14ec12220a71/82/d9
      /mnt/immich/i/upload/upload/b4fe288d-66ef-42ac-b74a-14ec12220a71/82/82
      ...
      
      1 Reply Last reply
      0
      • J jagan

        @girish I did run that, and got a very long list of files - php, png, svg on a wordpress site along with all the plugins.

        8fa600e9-45d8-421a-9c8c-ae223e3bd25b-image.png

        Absolutely no idea how to proceed.

        But for now, I will disable the apps shown the list and try, thank you!

        girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #17

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

        Absolutely no idea how to proceed.

        Those files are images (png). They should not be executable. You can go to the Web Terminal and run something like this:

        find /app/data/public/wp-content/plugins/updraftplus -type f -exec chmod a-x {} +
        

        Do this for other places which have 'x' bit on files as well. Generally, /app/data should not have any executable files (unless you have some scripts there).

        1 Reply Last reply
        0
        • S simon referenced this topic on
        • nebulonN Offline
          nebulonN Offline
          nebulon
          Staff
          wrote on last edited by
          #18

          @shrey can you run the Migration job in the end of the jobs section within Immich? https://immich.app/docs/administration/jobs-workers#jobs

          At least on my instance it purged most of the empty dirs. This seems to be a one-time housekeeping job. Not quite sure though why this is not run by default in Immich and needs to be manually triggered.

          S 1 Reply Last reply
          1
          • nebulonN nebulon

            @shrey can you run the Migration job in the end of the jobs section within Immich? https://immich.app/docs/administration/jobs-workers#jobs

            At least on my instance it purged most of the empty dirs. This seems to be a one-time housekeeping job. Not quite sure though why this is not run by default in Immich and needs to be manually triggered.

            S Offline
            S Offline
            shrey
            wrote on last edited by shrey
            #19

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

            @shrey can you run the Migration job in the end of the jobs section within Immich? https://immich.app/docs/administration/jobs-workers#jobs

            Tried that.
            But on my Immich instance (v1.123.0), it seems to have no effect on the concerned empty directories 😕

            root@apps:~# find /mnt/immich/i -type d -empty | wc -l
            56587
            
            1 Reply Last reply
            0
            • nebulonN Offline
              nebulonN Offline
              nebulon
              Staff
              wrote on last edited by
              #20

              so are all those empty dirs within the upload folder in your case? Also did you happen to change the data layout at some point in the past?

              S 1 Reply Last reply
              0
              • nebulonN nebulon

                so are all those empty dirs within the upload folder in your case? Also did you happen to change the data layout at some point in the past?

                S Offline
                S Offline
                shrey
                wrote on last edited by
                #21

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

                so are all those empty dirs within the upload folder in your case?

                Except for :

                /mnt/immich/i/typesense
                

                all of the paths seems to be:

                /mnt/immich/i/upload/upload/b4fe288d-66ef-42ac-b74a-14ec12220a71/../..
                

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

                Also did you happen to change the data layout at some point in the past?

                I think i migrated the app storage from local disk to a volume, around 5 months ago.

                1 Reply Last reply
                0
                • nebulonN Offline
                  nebulonN Offline
                  nebulon
                  Staff
                  wrote on last edited by
                  #22

                  Ah then this looks like an upstream bug https://github.com/immich-app/immich/issues/9202 with the discussion at https://github.com/immich-app/immich/discussions/9204 so looks like their strategy is that the user has to manually purge those.

                  1 Reply Last reply
                  1
                  • S Offline
                    S Offline
                    shrey
                    wrote on last edited by shrey
                    #23

                    @nebulon

                    Seem to have finally resolved the issue, by deleting those empty directories, using find . -type d -empty -delete, for now.

                    Although, the app is steadily creating new empty directories already!

                    1 Reply Last reply
                    2
                    • S Offline
                      S Offline
                      SebGG
                      wrote on last edited by
                      #24

                      i have the same problem, but it stops while backuping my nextcloud instance. Is this a general issue?

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        SebGG
                        wrote on last edited by
                        #25

                        ok, i found the directory. It was the preview directory in the nextcloud instance. After cleaning the directory the backup was succesfull.

                        1 Reply Last reply
                        0
                        • J Offline
                          J Offline
                          jagan
                          wrote on last edited by
                          #26

                          I have this backup issue with two instances.
                          In one with Nextcloud, it is empty directories.
                          In a Wordpress one, it is executable files.
                          Hoping to tackle this two this weekend.

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            SebGG
                            wrote on last edited by
                            #27

                            ok. but is this a bug or normal behavior caused by the cloudron update? i would say that these empty folders must have been there for some time and the backup only ran into this error last week.

                            girishG 1 Reply Last reply
                            0
                            • S SebGG

                              ok. but is this a bug or normal behavior caused by the cloudron update? i would say that these empty folders must have been there for some time and the backup only ran into this error last week.

                              girishG Offline
                              girishG Offline
                              girish
                              Staff
                              wrote on last edited by
                              #28

                              @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 1 Reply Last reply
                              1
                              • 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 Offline
                                  J Offline
                                  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 Offline
                                    J Offline
                                    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 2 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 Offline
                                      imc67I Offline
                                      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 Offline
                                        jdaviescoatesJ Offline
                                        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 Offline
                                          jdaviescoatesJ Offline
                                          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
                                          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