Anybody able to upgrade the Samba Recycle Bin with VFS_Recycle for > 6.1


Recommended Posts

influencer originally made the plugin

 

https://github.com/Influencer/UNplugged/raw/dev/vfs_recycle_unplugged.plg

 

i already updated it once for the php changes made but this is like a life thread for me (see attached)

i won't update to 6.1 without this safety net....

I already spend like 2 hours replacing all /etc/rc.d/ lines to the new /usr/local/emhttp/plugins/xxxx/scripts/rc.myService lines

but i guess there are more changes to be made as it won't work  >:(

vfs_recycle_unplugged.1.2.zip

Link to comment

I was just about to start a new thread myself! :)

 

Someone really needs to take this under their wing to get it running smoothly.  Even under 6.0.1 it was always enabled, and you couldn't update the settings.

 

I want to upgrade, but this plugin is holding me back.  I can't live without a recycle bin with a family all accessing the server!!!!

 

Someone please help!  Please!  Pretty Please!  With sugar on the top!!!!  Did I say please?????

Link to comment

The plugin has the old v5 structure and needs to be redone to the v6 plugin structure and methods.  Let me take a look at it this weekend and see if I can rewrite it to the v6.1 standards and security methods.  As it stands, I would not use it with a few hacks made simply to get it working.

 

I'll need someone to beta test for me.  I'll try to make it 6.0.1 compatible, but will concentrate on 6.1.

Link to comment

Cheers dlandon.  A number of users are keen to get this up and running, but none of us have the knowledge to fix it and make it workable.  Influencer is very busy and it's been left to it's own devices with people patching issues here and there.

 

Happy to beta test it on my 6.1 backup system. :)

 

It worked on 6.01 BUT the plugin part wasn't functional for settings etc.  The actual recycle bin worked ok.

 

In 6.1 it was still installed, but only the folder structure was recycled, the files weren't.  I also tried just putting the code into the additional smb-extra.conf after removing the plugin and it still wouldn't work.

 

It's a function that is lacking as a core option in unraid IMO.  I lost lots of data back in the 4.7 days when windows explorer lagged while I was deleting a folder and poof, data gone!  Lesson learned, I have backup unraid system that I manually sync now but I was a little naive back then! :)

Link to comment

I have a beta test version ready for 6.1.  Can someone try it out for me?  I'm going to give it a try on 6.0.1, but I'm not confident it will work for that version.  For now 6.1 only.

 

I have not checked out any of the cron functions like weekly trash empty.  I'll check that out now to see if the cron events are set properly.

 

Use this link to load the plugin in the "Install Plugin" tab:

https://github.com/dlandon/vfs_recycle/raw/master/vfs_recycle.plg

 

Once I get some feedback and I am confident that it is working, I will start a new post about this updated version.

 

I actually like this plugin and can see some real advantages for unRAID.  I have deleted files before that I really didn't want to.

Link to comment

Also, to the person who asked about keeping the directory hierarchy...

 

It might one of the following 2 options. This is an excerpt from my manually configured recycle bin, using /mnt/user/BIN/ structure. The "%m" means to use the machine name of the client, so this way I know which system did the delete, which is enough for me to know who did what. This does keep the directory hierarchy when files are deleted.

 

[global]

vfs objects = recycle
recycle:repository = /mnt/user/BIN/%m
recycle:keeptree = Yes

Link to comment

Also, to the person who asked about keeping the directory hierarchy...

 

It might one of the following 2 options. This is an excerpt from my manually configured recycle bin, using /mnt/user/BIN/ structure. The "%m" means to use the machine name of the client, so this way I know which system did the delete, which is enough for me to know who did what. This does keep the directory hierarchy when files are deleted.

 

[global]

vfs objects = recycle
recycle:repository = /mnt/user/BIN/%m
recycle:keeptree = Yes

 

That's the one BRiT :)  I knew it was somewhere!  It seems to have disappeared from the plg that installs to the smb-extra.conf file.  It's pretty important to is stores files differently if called the same on different shares.

Link to comment

Here's the smb-extra.conf off my 6.0.1 running the hacked plugin

 

[global]
security = USER#vfs_recycle_start
#Recycle bin share
[RecycleBin]
path = /mnt/user/.Recycle.Bin
read only = No

#vfs config
# Documentation http://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html
# Forum topic http://lime-technology.com/forum/index.php?topic=5446.0
# %S Samba share name (which in unRaid equals the user share name), eg. Storage
# %P User share full path, eg /mnt/user/Storage
# %u Username of the current service, if any
# To apply changes execute: /etc/rc.d/rc.samba restart
# If the single custom bin solution is chosen, create the dir manually, and grant it g+rwx permissions

[global]
vfs objects = recycle
   recycle:repository = /mnt/user/.Recycle.Bin
   recycle:directory_mode = 0777
   recycle:keeptree = Yes
   recycle:touch = Yes
   recycle:touch_mtime = Yes
   recycle:versions = Yes
   recycle:exclude = *.tmp   
   recycle:exclude_dir = .Recycle.Bin
acl allow execute always = yes
#vfs_recycle_end

 

And the new v6.1 plugin code

#vfs_recycle_start
#Recycle bin share
[RecycleBin]
path = /mnt/user/.Recycle.Bin
read only = No

#vfs config
# Documentation http://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html
# Forum topic http://lime-technology.com/forum/index.php?topic=5446.0
# %S Samba share name (which in unRaid equals the user share name), eg. Storage
# %P User share full path, eg /mnt/user/Storage
# %u Username of the current service, if any
# To apply changes execute: /etc/rc.d/rc.samba restart
# If the single custom bin solution is chosen, create the dir manually, and grant it g+rwx permissions

[global]
vfs objects = recycle
   recycle:repository = /mnt/user/.Recycle.Bin/%P
        recycle:keeptree = Yes
        recycle:touch = Yes
   recycle:touch_mtime = Yes
        recycle:versions = Yes
        recycle:exclude = *.tmp   
        recycle:exclude_dir = .Recycle.Bin
acl allow execute always = yes
#vfs_recycle_end

Link to comment

I changed mine to use include the share name, as I just noticed it was missing.

 

recycle:repository = /mnt/user/BIN/%m/%S

 

For example, that makes the deleted file(s) show up as:

/mnt/user/BIN/laptop/Windows7/Drivers/HRHomeRun/hdhomerun_windows_20091024.exe

 

Where laptop is the machine that did the delete, and Windows7 is the unraid Share name, the rest is the directory hierarchy and filename that was deleted.

 

I'm not sure which I'd prefer, using the "%S" or the full path of "%P". It's easily a user preference thing, where one size won't fit all.

Link to comment

I'm changing it to show the share the file came from.  I think the full path /mnt/user... is a bit much and not necessary.

 

I'll issue an upgrade tomorrow with this fix and a fix for the weekly empty trash cron, along with some other minor fixes.  I'll also start a new post for this updated version so it will be less confusing and have jonp list it in the 6.1 compatible plugins.  This updated plugin is only compatible with 6.1 and will probably stay that way.

Link to comment

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.