2010
12.12

It’s possible to add a recycle bin to your Samba shares. This way you won’t be bothered with restoring back-ups for a deleted file. What you need to do to enable the recycle bin functionality on your samba shares:

-          Create a config file in /etc/samba for the recycle bin config. (I created /etc/samba/rb.conf)
-          Place the following config into the file:                       

##Recycle Bin Configuration File##

name = Recycle Bin
mode = KEEP_DIRECTORIES|VERSIONS|TOUCH
maxsize = 0
exclude = *.tmp|*.temp|*.o|*.obj|~$*|*.~??|*.log|*.trace
excludedir = /tmp|/temp|/cache
noversions = *.doc|*.ppt|*.dat|*.ini

-          Edit your Samba configuration file (/etc/samba.smb.conf).
-          Add the following lines to the share(s) you want to have the recycle bin functionality: 

vfs object = recycle
config-file = /etc/samba/recycle.conf
recycle:repository = Recycle Bin
recycle:keeptree = Yes
recycle:versions = Yes 

-          Restart Samba (“/etc/init.d/samba restart” or “service samba restart”)
-          It could be that you first need to delete a file before the recycle bin folder will show up.

There are lots of options to fine tune to your needs! 

No Comment.

Add Your Comment