Recycle Bin (vfs recycle) for SMB Shares


dlandon

Recommended Posts

  • 2 weeks later...

I have a problem that a share is not detected.

It is one that is not exported via the unraid gui but rather manual config change of samba.

The reason for this is that it's a users share where the subfolders have different permissions which is not possible from the gui.

 

Is there a way to enable the recycle bin for this share?

The plugin does not see it.

 

thanks!

Link to comment
1 hour ago, WEHA said:

I have a problem that a share is not detected.

It is one that is not exported via the unraid gui but rather manual config change of samba.

The reason for this is that it's a users share where the subfolders have different permissions which is not possible from the gui.

 

Is there a way to enable the recycle bin for this share?

The plugin does not see it.

 

thanks!

The plugin will only see shares setup through the unRAID gui or the UD plugin.

Link to comment
Just now, dlandon said:

The plugin will only see shares setup through the unRAID gui or the UD plugin.

Would it be possible to add an included shares like the excluded shares?

Or can you tell me what I need to add to my manual change in the smb config?

 

thanks!

Link to comment
5 hours ago, WEHA said:

Would it be possible to add an included shares like the excluded shares?

Or can you tell me what I need to add to my manual change in the smb config?

 

thanks!

The recycle bin plugin is tightly integrated to the unRAID SMB shares configuration and adding other shares is not advised or practical.  You should create your share in unRAID and control access with user credentials.

  • Upvote 1
Link to comment
17 minutes ago, Energen said:

Every time I delete a large quantity of files the unraid GUI locks up when I try to access the Recycle Bin page... anyone else?   I don't know if it might have something to do with it trying to display the log of files that have been deleted? 

 

 

Which version of unRaid? Is it the 6.3.x stable or the 6.4 beta series?

Link to comment
8 hours ago, Energen said:

Every time I delete a large quantity of files the unraid GUI locks up when I try to access the Recycle Bin page... anyone else?   I don't know if it might have something to do with it trying to display the log of files that have been deleted? 

 

You are probably overwhelming the recycle bin with files.  Is it necessary for all those files to go the recycle bin?  Exclude some shares or some file types and cut down on what goes to the recycle bin.

Link to comment
  • 2 weeks later...

Dlandon,

 

I was running 6.2.4 with your previous recycle bin. I wanted to update unraid to newest version 6.3.2, I emptied the recycle bin before I started but I forgot to uninstall before the update. I updated unraid, started the array, uninstalled the old plugin, searched for the new one on CA and installed it. When I go into the settings for it it shows me it has 53G in the recycle bin, I am worried that it may be including everything in my cache drive in it or something. I have disabled it for now, could you advise what I can do to figure out what went wrong and fix it?

Thanks!

Capture.JPG

Link to comment

The plugin is just fine.  The 53G is all the files found in any mounts with a .Recycle.Bin folder.  You have mounts that are not shared, and therefore do not show up in the 'User Shares' tab.  Click on the Recycle Bin trash can icon and you'll be able to browse the shares and find the files.  The 'User Shares' will only show SMB shared mounts.

 

You can just empty the trash and it should empty all mounts with a .Recycle.Bin folder.

  • Upvote 1
Link to comment
12 hours ago, dlandon said:

The plugin is just fine.  The 53G is all the files found in any mounts with a .Recycle.Bin folder.  You have mounts that are not shared, and therefore do not show up in the 'User Shares' tab.  Click on the Recycle Bin trash can icon and you'll be able to browse the shares and find the files.  The 'User Shares' will only show SMB shared mounts.

 

You can just empty the trash and it should empty all mounts with a .Recycle.Bin folder.

Oh thanks. In the old version that number used to be the amount in the trash bin itself. I didn't want to wipe 53GB of stuff by mistake.

Link to comment

The 53GB of files is in the recycle bin of a mount that isn't shared at the moment.  It's really the same as the previous recycle bin plugin.  The difference is that the shares only show if they are currently SMB shares.  Mount points that have a .Recycle.Bin folder add to the 53GB shown.  That's really the total recycle bin amount.

 

Click the trash can icon and you can browse the actual .Recycle.Bin folders and see where the files are.

  • Upvote 1
Link to comment
  • 4 weeks later...

Hi  

 

I searched the thread but haven't read all 14 pages so forgive me if I missed this...

 

Is it possible for the plugin not to delete the .Recycle.Bin directory when it deletes all the contained files?

 

I'm using Radarr and when I get a better copy of a movie, I configured it to move the old file to /movies/.Recycle.Bin

 

It works well except that it won't create .Recycle.Bin if it does not exist and it won't import better versions of movies if it can't move the old one so I'm stuck manually recreating the .Recycle.Bin directory manually.

 

Thanks

Link to comment
6 hours ago, Gog said:

Hi  

 

I searched the thread but haven't read all 14 pages so forgive me if I missed this...

 

Is it possible for the plugin not to delete the .Recycle.Bin directory when it deletes all the contained files?

 

I'm using Radarr and when I get a better copy of a movie, I configured it to move the old file to /movies/.Recycle.Bin

 

It works well except that it won't create .Recycle.Bin if it does not exist and it won't import better versions of movies if it can't move the old one so I'm stuck manually recreating the .Recycle.Bin directory manually.

 

Thanks

This isn't really an answer to your question, but just wanted to make sure you know that Radarr doesn't have to have recycle bin to be able to delete video files. It's just more permanent without a recycle bin. If you leave that setting empty files will still get deleted.

Link to comment
3 hours ago, wgstarks said:

This isn't really an answer to your question, but just wanted to make sure you know that Radarr doesn't have to have recycle bin to be able to delete video files. It's just more permanent without a recycle bin. If you leave that setting empty files will still get deleted.

 

Yes, I get that but I don't trust blindly what gets downloaded.  I want to be able to get back to the old version if something went wrong with the new file.

 

I increased the max age for files in the recycle bin, that leaves me more chance of keeping at least a file in there and space is not an issue but I'd prefer to have that directory locked in.

Link to comment
10 hours ago, Gog said:

Hi  

 

I searched the thread but haven't read all 14 pages so forgive me if I missed this...

 

Is it possible for the plugin not to delete the .Recycle.Bin directory when it deletes all the contained files?

 

I'm using Radarr and when I get a better copy of a movie, I configured it to move the old file to /movies/.Recycle.Bin

 

It works well except that it won't create .Recycle.Bin if it does not exist and it won't import better versions of movies if it can't move the old one so I'm stuck manually recreating the .Recycle.Bin directory manually.

 

Thanks

Add another path mapping to Radarr.  Something like

 

/RecycleBin mapped to /mnt/user/movies/.Recycle.Bin 

 

Tell Radarr to move the files to /RecycleBin

 

Whenever the app starts, it will wind up creating .RecycleBin for you.

Link to comment
5 hours ago, Squid said:

Add another path mapping to Radarr.  Something like

 

/RecycleBin mapped to /mnt/user/movies/.Recycle.Bin 

 

Tell Radarr to move the files to /RecycleBin

 

Whenever the app starts, it will wind up creating .RecycleBin for you.

 

Interesting idea.

 

Radarr only starts when I reboot though. What happens if .Recycle.Bin is deleted when the mapping is already created?  I guess I can test that quickly enough.  BRB...

Link to comment

blah...

 

The mapping creates the directory when the docker starts but if the directory is deleted outside of the docker, you end up with this:

root@3f3b2c087cc7:/# ls -al
ls: cannot access 'RecycleBin': No such file or directory
total 4
...
d?????????   ? ?    ?        ?            ? RecycleBin


root@3f3b2c087cc7:/# cd RecycleBin
bash: cd: RecycleBin: No such file or directory

And if I recreate the directory outside of the docker, it doesn not "reconnect" in the docker

 

 

Close but no cigar...

 

Link to comment

The .Recycle.Bin folder is removed when the purge procedure sees that the folder is empty, or the recycle bin is forced to empty.  I guess I don't understand why you see the .Recycle.Bin folder removed.  Are you emptying the recycle bin manually?

 

If you set a long time to age the removed files, chances are the recycle bin will not be empty and the folder will not be removed.  Or you could set up a User Scripts cron to create a file in the .Recycle.Bin every day, set the age to purge to be something over 1 day, and the .Recycle.Folder will never be removed unless you force it empty.

Link to comment
27 minutes ago, dlandon said:

Or you could set up a User Scripts cron to create a file in the .Recycle.Bin every day, set the age to purge to be something over 1 day, and the .Recycle.Folder will never be removed unless you force it empty.

I'm not much on scripting. What would I need for a script to copy a placeholder.txt file to .Recycle.Bin? Would just a cp command work or does it need something more?

Link to comment
3 minutes ago, wgstarks said:

I'm not much on scripting. What would I need for a script to copy a placeholder.txt file to .Recycle.Bin? Would just a cp command work or does it need something more?

 

Echo "" > /mnt/user/share/.Recycle.Bin/placeholder.txt

Edited by dlandon
  • Upvote 1
Link to comment
  • 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.