Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Recycle Bin (vfs recycle) for SMB Shares

Featured Replies

  • Author

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.
  • Replies 1.3k
  • Views 396.7k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

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

  • dlandon
    dlandon

    Done.   The file directory in the recycle bin is created when the file is deleted so it will show the date/time when the file(s) were deleted, but the modify date/time on the files will rema

  • The excluded files input field in the settings is now 150 characters.

Posted Images

  • Author

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.

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

Somehow I clicked Stop by accident.   When I hit Start it started fine but it caused all SMB connections to drop.  Wasted 2hrs plotting a file.

  • 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

17 minutes ago, 007craft said:

Anyway to have the plugin save those files too?

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

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.

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.

can't install the plugin correctly, what's the problem?

 

2021-06-26_164532.jpg

  • Author
1 hour ago, rallos_hoo said:

can't install the plugin correctly, what's the problem?

 

2021-06-26_164532.jpg

Post diagnostics.

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

6 minutes ago, R1ver said:

deleted the file

How are you deleting? 

2 minutes ago, trurl said:

How are you deleting? 

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

  • Author
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.

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 :)

  • Author
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?

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.

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. 

  • 1 month later...
On 4/25/2021 at 5:14 PM, wgstarks said:

Settings>SMB Settings>Hide "dot" files.

@dlandon

What do you think about a link in your settings which explains this?

image.png.6602e379a8130ffc97d4ee2e7eb88361.png

 

 

  • Author
5 hours ago, mgutt said:

@dlandon

What do you think about a link in your settings which explains this?

image.png.6602e379a8130ffc97d4ee2e7eb88361.png

 

 

Let me give this some thought.

On 6/30/2021 at 3:07 PM, dlandon said:

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

Actually this might be interesting because:
If you might have a file like "ssh" in your raspberry pi config folder which is an empty file, this file might not be recycled and if you would go to recover the recycled folder it will be recovered without the ssh file.

Thus if not noticing and if pushing this to the sd of your pi you would be unable to connect over ssh.

 

Hope im not mistaking here. Just a thought.

On 6/30/2021 at 2:07 PM, dlandon said:

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

 

Because the metadata of a file is itself data in the same way its contents is e.g. its name, size and creation date etc. So if the Recycle Bin is there to protect data from accidental deletion then it should protect the metadata from deletion as well.

 

Also, sometimes some content-type data is stored in the file name rather than within the file so some operations can be performed with just directory access rather than opening each file. An example is hMailServer which downloads each email into a file named <GUID>.eml. Granted the files in this case should never logically have zero size, but I have seen them with zero size when there's been a disk problem.

 

Another good example where zero length files could be significant is if a program's data or installation folder gets deleted by accident. I might have no idea whether there are zero length files in there or not or if any zero length ones have any meaning - I would just go to the Recycle Bin and recover the whole lot.

 

I would also say it is more intuitive to have all files protected - I assumed they were until I read this post!

 

By the way, I'm not criticising Recycle Bin as it stands - it's still a great addition to unRAID - I'm just answering the question by explaining why I would bother to protect empty files.

@dlandon Hi

I noticed that the localization file does not contain the line "Enable Recycle Bin"

Also, I did not find where the line "Enable Recycle Bin for deleted files" is used

and The "Recycle Bin" line is duplicated on lines 1 and 35

 

Suggestion: sort all strings alphabetically

Edited by Barboska

@dlandon Thank you very much for the prompt fix.

Please correct this small mistake too: "Recycle Bin is empty" - missing tags

"Recycle Bin permissions" - missing line in translation

This line has an extra line break 

Edited by Barboska

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.