KB450121 – Enable SMB Recycle Bin in FreeNAS

Last modified: July 16, 2021
You are here:

Enable SMB Recycle Bin in FreeNAS

Scope/Description:

This article describes the process of enabling a recycle bin for your samba shares. The recycle bin feature of FreeNAS shares allows you to recover a document that’s been deleted by accident. However, it is not enabled by default. It should be turned on when setting up personal shares.

Prerequisites:

Configured Samba Share

Steps:

Shadow copies are really useful for accessing previous versions of a working document, but what happens if the working document is accidentally deleted? That’s where the recycle bin feature of FreeNAS shares allows you to recover a document that’s been deleted by accident. However, it is not enabled by default. It should be turned on when setting up personal shares.

To enable the recycle bin on a personal share select the share in the FreeNAS WebUI and then click on Advanced Mode.

screenshot.121

Next, check the box for Export Recycle Bin.

screenshot.123

That’s all there is to it.

Deleted files can be recovered from .recycle a hidden folder in the share.

Possibly one of the reasons the recycle bin is not enabled by default is that there isn’t a built-in feature in FreeNAS to manage the recycle bin. To work around this, add a line similar to the following to a cron job that runs daily. It will purge all files more than seven days old from the recycle bin of personal shares.

find /mnt/primary/home/*/.recycle/* -atime +7 -delete

screenshot.124

Verification:

Troubleshooting:

Was this article helpful?
Dislike 0
Views: 1661
Unboxing Racking Storage Drives Cable Setup Power UPS Sizing Remote Access