Recycle Bin (vfs recycle) for SMB Shares


dlandon

794 posts in this topic Last Reply

Recommended Posts

There are two tasks that run on a cron, one calculates the trash size, and the other does the remove of aged files depending on your settings.  The last time the recycle bin ran to remove aged files was on April 15th.  Try the following:

  • Restart the recycle bin.
  • Reboot if that doesn't work.
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

I recommend that you turn on recycle bin notifications so you can see that it runs when it is supposed to.  I've had a situation where the aged files process didn't run, but I was unable to figure out why.

Link to post
  • dlandon changed the title to Recycle Bin (vfs recycle) for SMB Shares
  • 4 weeks later...
  • 3 weeks later...

Ive been using this plugin for a while now without fail, but I just noticed it does not recycle files deleted by Radarr/Sonarr.  So if I go into my movies folder and delete a file, it keeps a copy in the .trash folder under the host name of the computer that deleted it so the plugin works perfectly.  But if Radarr deletes a file (Like say when doing a movie upgrade from 720p to 1080p), it deletes that 720p file but it doesnt goto the recycle bin.  It's just gone.  Anyway to have the plugin save those files too?  Sometimes radarr does an upgrade and the higher resolution version may have something wrong with it, or be worse than the file before and now my original file is gone forever.  Radarr is running in a docker on the unraid machine.

Edited by 007craft
Link to post
1 hour ago, 007craft said:

Ive been using this plugin for a while now without fail, but I just noticed it does not recycle files deleted by Radarr/Sonarr.  So if I go into my movies folder and delete a file, it keeps a copy in the .trash folder under the host name of the computer that deleted it so the plugin works perfectly.  But if Radarr deletes a file (Like say when doing a movie upgrade from 720p to 1080p), it deletes that 720p file but it doesnt goto the recycle bin.  It's just gone.  Anyway to have the plugin save those files too?  Sometimes radarr does an upgrade and the higher resolution version may have something wrong with it, or be worse than the file before and now my original file is gone forever.  Radarr is running in a docker on the unraid machine.

 

43 minutes ago, jonathanm said:

No, The plugin can only intercept actions done over SMB.

Actually, you can. It's not really the intended use of the plugin but it works.

 

You'll need to create a new path in the docker to your recycle _bin. Example-

1837148819_ScreenShot2021-06-25at9_31_51PM.png.4ef08a780e0a8017a6cc877f3477090c.png

 

And you'll also need to add a script to create a file in the recycle bin so it doesn't go away when emptied.

 

Discussion of this starts here and continues for a page or so. It's been quite a while since I set this up but I'll try to answer any questions if you have any after reading.

Link to post
2 hours ago, wgstarks said:

 

Actually, you can. It's not really the intended use of the plugin but it works.

 

You'll need to create a new path in the docker to your recycle _bin. Example-

1837148819_ScreenShot2021-06-25at9_31_51PM.png.4ef08a780e0a8017a6cc877f3477090c.png

 

And you'll also need to add a script to create a file in the recycle bin so it doesn't go away when emptied.

 

Discussion of this starts here and continues for a page or so. It's been quite a while since I set this up but I'll try to answer any questions if you have any after reading.


Thanks, but that discussion got complicated for me.  I couldnt really follow what the problem was.  Perhaps tho it has to do with an old version of radarr because I just checked the settings in radarr now and theres a "recycle bin" option to input a folder and then after 7 days (or however many days you set) it will delete the files.  I guess ill just use that.  No need for this plugin at all I guess since its built into radarr.

Link to post

Hi, I have same problem as Arby mentioned before - RecycleBin was installed properly but does not work for me... No .recycle.bin folders created, nothing is happening after deleting the files.. Please see screenshots below:

 

I have created and then deleted the file test.txt, but have not seen any recycle.bin folder created afterwards:

image.thumb.png.53f3a452928914964212e1fff38a4a59.png

 

image.png.db2e2debd8a383d0c4cd6effcfe2096d.png

 

image.png.7e3493cc86eef4434aa0537a0a393eac.png

 

Please see my configurations below:

image.thumb.png.0c160721e381a3d7087a36e60835c207.png

 

There is some RecycleBin folder exists in /mnt,

image.png.ed3c76258c247431ff59a4cbc0431118.png

 

but has no any deleted files:

image.png.f3f20f49eacb3a2344a10f32b944c023.png

 

Please kindly suggest what to do and how to resolve the issue.

Thank you very much!

nas-diagnostics-20210630-1402.zip

Edited by R1ver
Link to post
1 hour ago, R1ver said:

Through Windows SMB, by pressing "Delete" button on \\nas\Trainings\test.txt

I would set the 'Update Recycle Bin Size in Background?' to 'Yes'.  It refreshes the trash sizes and the share folders in the background.  The log shows the deleted file, so it is working.  There can sometimes be a slight delay in deleting a file and when it shows in the trash bin and local folders.

Link to post

Hi, I got what`s a problem is.

No matter if 'Update Recycle Bin Size in Background' set to Yes or No:

- if I create empty test.txt file and then delete it - nothing happens

- If I put some text into test.txt an then delete it - it works :)

 

So, when testing the service it is necessary to delete files with the contents, otherwise it would not work.

 

Thanks a lot for support and apologies for so dummy issue :)

Link to post
4 minutes ago, R1ver said:

Hi, I got what`s a problem is.

No matter if 'Update Recycle Bin Size in Background' set to Yes or No:

- if I create empty test.txt file and then delete it - nothing happens

- If I put some text into test.txt an then delete it - it works :)

 

So, when testing the service it is necessary to delete files with the contents, otherwise it would not work.

 

Thanks a lot for support and apologies for so dummy issue :)

The recycle bin plugin will not recycle an empty file.  Why bother?

Link to post

Agree, maybe it would be great to mention this specifics somewhere - as users like me would do the testing with 'fake' files and then would complain :))

 

Apologies once again.

Link to post
On 6/26/2021 at 10:01 PM, dlandon said:

I don't see anything wrong.  I tried and it installed for me.

 

Try this:

  • Uninstall the recycle bin plugin.
  • Delete the /flash/config/plugins/recycle.bin/ folder.
  • Re-install the recycle.bin plugin.

Yes! it works. Reall appreciate for your help. 

Link to post

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.