Recycle Bin (vfs recycle) for SMB Shares


dlandon

794 posts in this topic Last Reply

Recommended Posts

This plugin is great!

 

Could you perhaps add an option to move recycle bin to either the dashboard/main page or preferably the tabs (sth like where docker/vm/settings is placed)

Definitely do NOT move it to the top level tabs with docker/vm/settings. To much fighting for space at that level already.
Link to post
  • Replies 793
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

This is a plugin that will create a per share .Recycle.Bin folder on each smb share for files deleted on that share.  Built into samba is a module called "vfs recycle" that handles the deletion of fil

Shares were not displaying when "Log Deleted Files" was set to "No".  This has been fixed in the latest version.

No longer true.  I'm releasing a new version that will not show any remote mounted shares and the local recycle bin will not remove any files from the remote share recycle bins.  Only the local server

Posted Images

This plugin is great!

 

Could you perhaps add an option to move recycle bin to either the dashboard/main page or preferably the tabs (sth like where docker/vm/settings is placed)

Definitely do NOT move it to the top level tabs with docker/vm/settings. To much fighting for space at that level already.

First Come, First Served!!!    :P

 

 

TBH, I don't care if this plugin sits in the top tabs or not, but it HAS to be optional due to the inevitable display aberrations that will happen (and the support nightmare that entails)

Link to post

This plugin is great!

 

Could you perhaps add an option to move recycle bin to either the dashboard/main page or preferably the tabs (sth like where docker/vm/settings is placed)

Definitely do NOT move it to the top level tabs with docker/vm/settings. To much fighting for space at that level already.

First Come, First Served!!!    :P

 

Dang Squid, you beat me!

 

TBH, I don't care if this plugin sits in the top tabs or not, but it HAS to be optional due to the inevitable display aberrations that will happen (and the support nightmare that entails)

 

The recycle bin plugin is not in my opinion a high enough priority to take up the limited real estate of the main menu bar, and Squid is right if I try to make shuffling the tabs around like was done for the "Apps" tab it will be a support problem I do not have time for.

Link to post

I would rather see the UI take up 100% width of my monitor.  I have like 2" on each side that is not used....

 

Myk

 

On smaller screens like a laptop it just fits.  On an iPad it is almost too wide.  When it gets too wide, it folds back over itself and is quite messy.

Link to post

Another option would be a single button (like the array shutdown, sleep, reboot addon) where you can add different commands to it and be able to drag them up/down to arrange a the user needs.

 

Prime example is the Muximux container where you can put the link in the side dropdown

 

Myk

 

Link to post

Another option would be a single button (like the array shutdown, sleep, reboot addon) where you can add different commands to it and be able to drag them up/down to arrange a the user needs.

 

Prime example is the Muximux container where you can put the link in the side dropdown

 

Myk

Making core parts of the UI user configurable will only make support more confusing than it already is.
Link to post

I do understand all of your concerns. Since I regularly am clearing my recycle bin I would really appreciate the choice to put it in a more prominent place than the plugins section.

 

Maybe a hidden option to do so is enough  ;)

Link to post

I do understand all of your concerns. Since I regularly am clearing my recycle bin I would really appreciate the choice to put it in a more prominent place than the plugins section.

 

Maybe a hidden option to do so is enough  ;)

 

You can set up timed purges to remove aged files based on the aged days.  For example, remove aged files every hour that are older than one day.  That should be sufficient for your purposes.

 

Why do things manually?

Link to post

valid point, but I rather do the deletions myself. (its basically a few hundred gigs that are created when I backup my vms.) Not having those around for a couple of days makes sense to me, but in case of data loss I would like to keep them around longer...

 

But you are right, I should automate, rather than complicate my setup  :P

Link to post
  • 3 weeks later...

It would be great if there was a way to exclude a drive via the GUI as requested some time ago. I'd like to maintain my 14 day aged purge, while excluding my cache drive completely. For now I may look at a manual CRON, but if it could be added as an option to the GUI it would be far better.

 

Great plugin BTW, a must have!

Link to post
  • 3 weeks later...

It would be great if there was a way to exclude a drive via the GUI as requested some time ago. I'd like to maintain my 14 day aged purge, while excluding my cache drive completely. For now I may look at a manual CRON, but if it could be added as an option to the GUI it would be far better.

 

Great plugin BTW, a must have!

 

This is a to do in the future as time permits.

Link to post

Awesome plugin!

 

I wonder if it would be possible to make a plugin that keeps older versions of edited files in another share, kinda like your recycle bin plugin but for edited files as well?

 

This plugin uses the built in recycle bin capability of samba.  I don't see the functionality you are asking for ever, as it is not a trivial task and is not functionality that samba offers.

Link to post

I wonder if it would be possible to make a plugin that keeps older versions of edited files in another share, kinda like your recycle bin plugin but for edited files as well?

There are only 2 ways to accomplish that - by already having a copy of that file (which means having a full backup with copies of EVERY file), or an OS like Windows with builtin shadowing (detects an 'open for editing' and makes a 'shadow' copy first).  You either have to have a full backup system with versioning, or the hooks into the OS to detect every attempt to edit.  SAMBA is just a file transfer and access protocol, and the appropriate controls, to which has been added a delayed delete feature, popularly called a recycle bin.  No way to stretch that into versioning or shadowing.  If you really want something like that, you need to talk to the SAMBA people.

Link to post
  • 2 weeks later...

I get a bunch of errors when I try to install this plugin in 6.1.7.

 

Warning: simplexml_load_file(): /tmp/plugins/recycle.bin.plg:1: parser error : Document is empty in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 193

 

Warning: simplexml_load_file(): in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 193

 

Warning: simplexml_load_file(): ^ in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 193

 

Warning: simplexml_load_file(): /tmp/plugins/recycle.bin.plg:1: parser error : Start tag expected, '<' not found in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 193

 

Warning: simplexml_load_file(): in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 193

 

Warning: simplexml_load_file(): ^ in /usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin on line 193

plugin: xml parse error

 

I don't have a dynamix.plugin.manager folder/ subfolders on my unRAID.  Even if I manually create these folders, I still get errors.  Any idea what gives?

Link to post

It would be great if there was a way to exclude a drive via the GUI as requested some time ago. I'd like to maintain my 14 day aged purge, while excluding my cache drive completely. For now I may look at a manual CRON, but if it could be added as an option to the GUI it would be far better.

 

Great plugin BTW, a must have!

 

This is a to do in the future as time permits.

 

Thank you very much :)

Link to post

A new version of Recycle Bin is available.  I have implemented the feature to exclude shares from the recycle bin.  The way it works is that you specify the share(s) to be excluded and once an hour, a cron is executed to remove any deleted files from the share.  There is no clean way with the SMB recycle bin capability to exclude a share.  The recycle bin is implemented globally and can't be implemented on unRaid on a per share basis.  The only way to keep the recycle bin empty on a share is with the hourly cron.

 

If a share is on a hard disk, the hard disk may potentially spin up every hour to remove the deleted files.  If you use cache_dirs and there is nothing to be deleted, the disk will probably not spin up.

 

Only user shares can be excluded, not disk or cache shares.

 

EDIT: I'm working on the disk and cache share exclusions and it will be in the next release.

Link to post

Thanks for maintaining this, I love having it on my server. (noticed an "update" message today for your plugin, so had to swing by)

 

Maybe I am too tired from today, but your update reads a little funny to me. If I am reading (and hopefully understanding, more importantly) your explanation correct, your explanation of how you are attempting to "exclude" a share from the recycle bin, is to not actually exclude the share. But more to just purge any deleted files after an hour, thus not allowing any files to accumulate? This being the explanation of the share being "excluded"?

 

Sorry, If I am basically repeating what you wrote, I just want to make sure. The wife and I were building cabinets and organizing all day, so my brain shut off hours ago.

 

EDIT: want to add.... obviously, if I update to the latest plugin (code). If I don't exclude any shares, then I assume you have no hourly cron scheduled then, so no need to worry about any hourly spin up. So, if I like having global recycle bin, and currently do not have a need for purging any particular share on an hourly basis, is there any other changes in this version that would be nice, or am I good to stay put?

Link to post

Thanks for maintaining this, I love having it on my server. (noticed an "update" message today for your plugin, so had to swing by)

 

Maybe I am too tired from today, but your update reads a little funny to me. If I am reading (and hopefully understanding, more importantly) your explanation correct, your explanation of how you are attempting to "exclude" a share from the recycle bin, is to not actually exclude the share. But more to just purge any deleted files after an hour, thus not allowing any files to accumulate? This being the explanation of the share being "excluded"?

 

Sorry, If I am basically repeating what you wrote, I just want to make sure. The wife and I were building cabinets and organizing all day, so my brain shut off hours ago.

 

EDIT: want to add.... obviously, if I update to the latest plugin (code). If I don't exclude any shares, then I assume you have no hourly cron scheduled then, so no need to worry about any hourly spin up. So, if I like having global recycle bin, and currently do not have a need for purging any particular share on an hourly basis, is there any other changes in this version that would be nice, or am I good to stay put?

 

The cron only runs if you specify excluded shares.  It will not run otherwise and there is no difference in the recycle bin operation if not specified.

 

There have been some bug fixes.  You should update.  You will have to be on the latest version to get any support.

Link to post

So I updated to the latest version, that went smooth.

 

However I have one question now that I am poking around a bit more. If I go to the settings tab in UnRaid webgui, click on recycle bin at the bottom to go into the settings of recycle bin, I see recycle bin shows me I have about 150MB worth of data in the recycle bin.

 

Now, if I click the trash can icon here in the settings menu of recycle bin, it seem to take me to a folder tree so I can see what its the bin. What I am curious about is that when I click on "user", I see folders and files that were recently copied to my array through the cache drive. These are not files that should be marked for the recycle bin, so why/how is the recycle bin looking at them?

 

I added a pic for you, the receipt you are looking at is something I uploaded to array yesterday.

 

Recycle_Bin.PNG.1b27b6093a759573e8fcbeba184d0ced.PNG

Link to post
  • dlandon changed the title to Recycle Bin (vfs recycle) for SMB Shares

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.