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. Nextcloud
  3. Top tip: add trashbin_retention_obligation settings to your Nextcloud config.php

Top tip: add trashbin_retention_obligation settings to your Nextcloud config.php

Scheduled Pinned Locked Moved Solved Nextcloud
4 Posts 2 Posters 1.0k Views 2 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.
    • jdaviescoatesJ Offline
      jdaviescoatesJ Offline
      jdaviescoates
      wrote on last edited by
      #1

      The docs mention this, but something they don't point out is that if your users have an Unlimited quote (which I think is default with new Cloudron installs of Nextcloud) then files will never automatically get deleted.

      So, I've just added the following to my Nextcloud 'config.php' using the File Manager:

      'trashbin_retention_obligation' => '7,30',
      

      Which should mean that Deleted files are now kept for at least 7 days, but no more than 30.

      For the record, below is the round about journey that led me to do this...(this topic began life having a totally different subject, but as so often happens once I started writing it all down the answers I was looking for came to me)

      --

      Hi all,

      I'm running out of disk space 😱

      436a199f-5024-4d24-98fb-1834b5148e5a-image.png

      Thankfully I don't think it really was at 100% otherwise things would've likely completely broken, but they haven't (yet). And after seeing this notification I immediately uninstalled a load of apps that I had just installed to play around with and am not actually using.

      Now when I ssh in to my server it tells me:

      /dev/md2                             436G  376G   38G  91% /
      

      So I've got a little bit of space left, but not much, so I need to sort something out pretty sharpish.

      The next thing I just remembered to do is to empty my Nextcloud Deleted files...

      That freed up LOTS of space!

      /dev/md2                             436G  311G  104G  75% /
      

      Seems I had 66GB of Deleted Files! So problem solved for now...

      But really I need a more permanent solution...

      I've got one of these https://www.hetzner.com/dedicated-rootserver/ax41-nvme/

      As you can see, it comes with "2 x 512 GB NVMe SSD (software-RAID 1)"

      However, I only seem to be using one of those drives.

      Now I want to mount the other one as volume and then move all my Nextcloud data onto it.

      But I've no idea how to do that.

      I think this shows the 2 drives:

      # lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
      NAME        FSTYPE              SIZE MOUNTPOINT LABEL
      nvme0n1                       476.9G            
      ├─nvme0n1p1 linux_raid_member    32G            rescue:0
      │ └─md0     swap                 32G [SWAP]     
      ├─nvme0n1p2 linux_raid_member     1G            rescue:1
      │ └─md1     ext3               1022M /boot      
      └─nvme0n1p3 linux_raid_member 443.9G            rescue:2
        └─md2     ext4              443.8G /          
      nvme1n1                       476.9G            
      ├─nvme1n1p1 linux_raid_member    32G            rescue:0
      │ └─md0     swap                 32G [SWAP]     
      ├─nvme1n1p2 linux_raid_member     1G            rescue:1
      │ └─md1     ext3               1022M /boot      
      └─nvme1n1p3 linux_raid_member 443.9G            rescue:2
        └─md2     ext4              443.8G /     
      

      It looks to me like that are both mounded at / but I don't really understand that...

      Ah! I think it's to do with software-RAID 1, right? - which is mirroring one drive to the other. So I think I can't really use 2 x 512GB at all, can I? Because one is mirroring the other in case one of them dies. I guess this is probably wise. Presumably if one of the drives fails the software-RAID 1 stuff will just make everything keep working using the other drive, right? That sounds good.

      But when I purchased the machine I did so ignorantly thinking I'd actually be able to use 2 x 512GB 😕

      Oh well, I guess for now I'll just go and add some trashbin_retention_obligation settings to my Nextcloud to try and stop this happening again anytime soon!

      I use Cloudron with Gandi & Hetzner

      1 Reply Last reply
      3
      • jdaviescoatesJ Offline
        jdaviescoatesJ Offline
        jdaviescoates
        wrote on last edited by
        #2

        TBH I'm thinking that @staff should probably update the package to include some sensible defaults (as opposed to the current default which is that Deleted files are never actually deleted unless you manually delete them)

        I use Cloudron with Gandi & Hetzner

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

          @jdaviescoates think I agree. I will add the default to the package. Besides, should have backups anyway if they want to dig out ancient deleted files.

          1 Reply Last reply
          1
          • girishG girish moved this topic from Support on
          • girishG Do not disturb
            girishG Do not disturb
            girish
            Staff
            wrote on last edited by
            #4

            @jdaviescoates I have added your default in https://git.cloudron.io/cloudron/nextcloud-app/-/commit/b702e78a7e9be6abd541ab8d9496cd85f9b66c3e . Thanks!

            1 Reply Last reply
            2
            • nebulonN nebulon marked this topic as a question on
            • nebulonN nebulon has marked this topic as solved on
            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