Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/12/25 in all areas

  1. I will be having family use my server for backing stuff up and as we all know end users always end up accidently deleting things and then wanting them back. Luckily, TrueNAS has a recycle bin option and hopefully HexOS can add it in one day as a setting that can just be turned on. For anyone who finds this and wants to do it, here are the steps: Set up the folder in the HexOS UI and then in the TrueNAS UI go to: Shares > Click edit on the SMB you want to add the recycle bin too > Purpose = No Presets > Click Advanced Options > Scroll to Other Options > Check Export Recycle Bin Then you will want to set up a job to automatically empty your recycle bin: Navigate to Chron Jobs in the TrueNas UI (just search for it but it's under System > Advanced Settings). Click add then you can either enter this into the command field as ONE LINE or save it to a file find /mnt/HDDs/FOLDER/.recycle/* -atime +30 -delete; find /mnt/HDDs/FOLDER/.recycle/* -depth -type d -empty -delete; If you want to test to see what files will be deleted with this command run it without the "-delete" If you save it to a file (like I did) you will enter this as the command. sh /mnt/HDDs/PATH_TO_FILE/empty_recycle_bin.sh Then just fill out the description, run as truenas_admin, and how often you want it to run and you are good to go. Hope this helps and hopefully it can just be a 1 click type of setup in the future!! P.S. Here is what the commands do: The first command searches for files and directories in /mnt/HDDs/FOLDER/.recycle/ that have not been accessed in the last 30 days and deletes them. The second command searches for empty directories in /mnt/HDDs/FOLDER/.recycle/ and deletes them. Also commands were stolen from here
    1 point
×
×
  • Create New...