How to get deleted files in SMB/CIFS

    • OMV 4.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Hi,

      I discovered the same behavior with SMB/CIFS, already in OMV 3. There are several threads here in this forum regarding this.

      If it works correctly you should find a folder ".recycle" in the root folder of your share.

      I am currently using recycle.bin with my SMB/CIFS share under OMV3. But I didn´t use the button in the webUI of OMV, because it didn´t worked for my also. I have configured it diffently. But it was some time ago and I have to look what I have done precisely, but soonest next weekend, sorry.
      OMV 3.0.90 (Gray style)
      ASRock Rack C2550D4I - 16GB ECC - 6x WD RED 3TB (ZFS 2x3 Striped RaidZ1)- Fractal Design Node 304
    • Hi,

      Thank you for answering

      I use OMV version 4.1.3-1(Arrakis)

      After activating the "recycle bin" button in the WEB interface, I could not find a folder called ".recycle" in the sharing root folder. there is obviously a problem with this. You can configure the process in a different way. I would appreciate it if you look at this configuration over the weekend and share it with me.
    • Might be the .recycle folder is created only when the first file is deleted.

      If it is not working, you might try to add vfs objects = recycle to the extra options of the service or the share.
      Odroid HC2 - armbian - Seagate ST4000DM004 - OMV4.x
      Asrock Q1900DC-ITX - 16GB - 2x Seagate ST3000VN000 - Intenso SSD 120GB - OMV4.x
      :!: Backup - Solutions to common problems - OMV setup videos - OMV4 Documentation - user guide :!:
    • Ok, I double checked my OMV installation... And it seems I have activated the "Enable recycle bin" switch in the share settings only. Still no special configuration.

      I only added one line in the "extra options" field of each share:
      recycle:exclude_dir = .recycle
      This avoids deleting the .recycle folder itself creates a new .recycle folder.

      I also tried to define a period of days for automatic deletion of the recycle bin. But this didn´t worked for me, because my NAS is not running 24/7. Therefore i am using a script which I have have adopted from here:
      Automatisches Löschen des Samba-Papierkorbs auf einem FreeNAS/NAS4Free Server (Sorry, this is a German blog)
      I have modified the mentioned script "" a little bit and call it every time when the NAS is started. It is also possible to do this by a cron job.

      Two additional hints:
      • Don´t edit /etc/samba/smb.conf manually! Changes may be overwritten by OMV.
      • You can check the your samba settings with the command testparm
      OMV 3.0.90 (Gray style)
      ASRock Rack C2550D4I - 16GB ECC - 6x WD RED 3TB (ZFS 2x3 Striped RaidZ1)- Fractal Design Node 304

      The post was edited 2 times, last by cabrio_leo ().

    • Thank you for your help.

      When I leave the values here as 0, the .recycbin file comes out after deleting something in each folder. That's exactly what I wanted.

      Users could see the "reycbin" file as a hidden file in SBC / CIFS. This situation is not what I want. When I add as follows, I'm preventing users from seeing the "recycbin" file, and only the admin can see the "recycbin" file on the command line (Ubuntu) and it was very good for us.

      Global setting

      unix extensions = no
      veto files = /.*
      delete veto files = yes

      Finally I added the "reycbin" file in the cron tab line so that it doesn't grow in capacity. (last 7 days to stay)

      find /sharedfolders/XXXX/.recycle/ -type f -mtime -7 -delete