dlandon Posted February 18, 2017 Author Share Posted February 18, 2017 I love this plug in dlandon! When I delete items from my Linux machine it puts them in . Trash-1000 in the root of the active share. Would it be possible to have this plug-in also monitor .Trash-1000 when it comes to Empty & purge functions? Thanks The Recycle Bin plugin manages samba deleted files and the trash you are talking about is created with NFS mounted shares. I don't think it's a good idea to try to manage NFS trash with this plugin. Perhaps a simple user script run by cron that periodically moves the folders into the Recycle Bin folders? This would accomplish what you want. Once a day? Quote Link to comment
landS Posted February 19, 2017 Share Posted February 19, 2017 I love this plug in dlandon! When I delete items from my Linux machine it puts them in . Trash-1000 in the root of the active share. Would it be possible to have this plug-in also monitor .Trash-1000 when it comes to Empty & purge functions? Thanks The Recycle Bin plugin manages samba deleted files and the trash you are talking about is created with NFS mounted shares. I don't think it's a good idea to try to manage NFS trash with this plugin. Perhaps a simple user script run by cron that periodically moves the folders into the Recycle Bin folders? This would accomplish what you want. Once a day? Good idea guys. Yup, this would be perfect Quote Link to comment
dlandon Posted February 19, 2017 Author Share Posted February 19, 2017 I love this plug in dlandon! When I delete items from my Linux machine it puts them in . Trash-1000 in the root of the active share. Would it be possible to have this plug-in also monitor .Trash-1000 when it comes to Empty & purge functions? Thanks The Recycle Bin plugin manages samba deleted files and the trash you are talking about is created with NFS mounted shares. I don't think it's a good idea to try to manage NFS trash with this plugin. Perhaps a simple user script run by cron that periodically moves the folders into the Recycle Bin folders? This would accomplish what you want. Once a day? Good idea guys. Yup, this would be perfect You would have to create a script to do this. I would suggest using User Scripts and set it up to run once a day. Quote Link to comment
landS Posted February 19, 2017 Share Posted February 19, 2017 Thanks dlandon. Will do just that Quote Link to comment
Ryland Posted February 26, 2017 Share Posted February 26, 2017 Why is there now a RecycleBin directory in /mnt? I woke up this morning to Fix Common Problems complaining that there is now "Invalid folder RecycleBin contained within /mnt". It has a modified date/time that keeps updating and I assume that it was created by this plugin although its user/group is root/root. Quote Link to comment
dlandon Posted February 26, 2017 Author Share Posted February 26, 2017 2 hours ago, Ryland said: Why is there now a RecycleBin directory in /mnt? I woke up this morning to Fix Common Problems complaining that there is now "Invalid folder RecycleBin contained within /mnt". It has a modified date/time that keeps updating and I assume that it was created by this plugin although its user/group is root/root. The RecycleBin at /mnt/ is a directory of symlinks to the .Recycle.Bin shares so it can be browsed by the built in file browser at /mnt/. It updates every second to keep current with the .Recycle.Bin share directories. FCP should ignore this directory. 1 Quote Link to comment
Ryland Posted February 26, 2017 Share Posted February 26, 2017 1 hour ago, dlandon said: The RecycleBin at /mnt/ is a directory of symlinks to the .Recycle.Bin shares so it can be browsed by the built in file browser at /mnt/. It updates every second to keep current with the .Recycle.Bin share directories. FCP should ignore this directory. Great, thanks. I will tell FCP to ignore the error. Quote Link to comment
Squid Posted February 27, 2017 Share Posted February 27, 2017 5 hours ago, Ryland said: Great, thanks. I will tell FCP to ignore the error. Updated FCP to not report this Quote Link to comment
Lacehim Posted March 6, 2017 Share Posted March 6, 2017 Thanks dlandon This plugin has saved me in the past. I just noticed it wasn't working on 6.3 and found your update! Thanks for your hard work in making it happen. Quote Link to comment
Lacehim Posted March 6, 2017 Share Posted March 6, 2017 Is there a reason why this isn't working on some shares? I have nothing in excluded shares, but for some reason nothing is recycled in "Backups" but in "Documents" it is. It's a bit strange. Quote Link to comment
Lacehim Posted March 6, 2017 Share Posted March 6, 2017 33 minutes ago, Lacehim said: Is there a reason why this isn't working on some shares? I have nothing in excluded shares, but for some reason nothing is recycled in "Backups" but in "Documents" it is. It's a bit strange. Figured it out. Permissions was set as root, so ran the permissions script and it's working like a charm now. Phew. Quote Link to comment
dlandon Posted March 6, 2017 Author Share Posted March 6, 2017 2 hours ago, Lacehim said: Figured it out. Permissions was set as root, so ran the permissions script and it's working like a charm now. Phew. Glad I could help. Quote Link to comment
SelfSD Posted April 30, 2017 Share Posted April 30, 2017 I just updated from 6.2.4 to 6.3.3. Uninstalled the plugin before upgrade and reinstalled afterwards. Current version is 2017.03.26 However none of my shares are listed in the Included Shares section and files I delete are not moved to the .Recycle.Bin folder but as you can see, the plugin is detecting the existing bin folders. Ignore the size. It's about 30 old movies I didn't remove before taking the screenshot. SMB Extras has this in it: #vfs_recycle_start #Recycle bin configuration [global] syslog only = Yes log level = 0 vfs:0 #vfs_recycle_end I ran the docker safe new permissions but it didn't help. I've tried to restart the server and the plugin a few times too without any luck. What would the next step be to try to get it to work again? Logs are attached. unraid-diagnostics-20170430-0529.zip Quote Link to comment
Lacehim Posted April 30, 2017 Share Posted April 30, 2017 I just checked mine and it was stopped, which is strange because it was turned off before and working. Started it again, and same issue as your getting. It has picked up one share only which is empty. I'm running 6.3.3 and 2017.03.26 plugin that was updated a few days ago. 1 Quote Link to comment
Lacehim Posted April 30, 2017 Share Posted April 30, 2017 I just turned on log deleted files and all the shares appeared listed. Give that a try. 1 Quote Link to comment
SelfSD Posted April 30, 2017 Share Posted April 30, 2017 (edited) 1 hour ago, Lacehim said: I just turned on log deleted files and all the shares appeared listed. Give that a try. This worked! Thank you! However deleted files are not logged. The files gets moved to the .Recycle.Bin folder but the logs stays empty. Never mind. Deletions are logged now. Maybe it was just slow to start. Edited April 30, 2017 by SelfSD I was wrong. Quote Link to comment
dlandon Posted April 30, 2017 Author Share Posted April 30, 2017 2 hours ago, SelfSD said: This worked! Thank you! However deleted files are not logged. The files gets moved to the .Recycle.Bin folder but the logs stays empty. Never mind. Deletions are logged now. Maybe it was just slow to start. Shares were not displaying when "Log Deleted Files" was set to "No". This has been fixed in the latest version. 2 Quote Link to comment
graywolf Posted April 30, 2017 Share Posted April 30, 2017 I had to find a file to undelete. I notice that the dates (accessed/modified/created) are all for the date/time the file was deleted. Is there an option to retain the original date modified or created? #vfs_recycle_start #Recycle bin configuration [global] syslog only = No log level = 0 vfs:0 #vfs_recycle_end Quote Link to comment
dlandon Posted April 30, 2017 Author Share Posted April 30, 2017 42 minutes ago, graywolf said: I had to find a file to undelete. I notice that the dates (accessed/modified/created) are all for the date/time the file was deleted. Is there an option to retain the original date modified or created? #vfs_recycle_start #Recycle bin configuration [global] syslog only = No log level = 0 vfs:0 #vfs_recycle_end No. That's how the samba vfs recycle works and I have no control over that. 1 Quote Link to comment
graywolf Posted May 7, 2017 Share Posted May 7, 2017 Not sure what the PlugIn does behind the scenes but is it possible to allow one or the other of these as options? Depending upon which one you are not using for your Aging logic? recycle:touch = BOOL Specifies whether a file's access date should be updated when the file is moved to the repository. recycle:touch_mtime = BOOL Specifies whether a file's last modified date should be updated when the file is moved to the repository. https://www.samba.org/samba/docs/man/manpages/vfs_recycle.8.html Quote Link to comment
dlandon Posted May 7, 2017 Author Share Posted May 7, 2017 (edited) 52 minutes ago, graywolf said: Not sure what the PlugIn does behind the scenes but is it possible to allow one or the other of these as options? Depending upon which one you are not using for your Aging logic? recycle:touch = BOOL Specifies whether a file's access date should be updated when the file is moved to the repository. recycle:touch_mtime = BOOL Specifies whether a file's last modified date should be updated when the file is moved to the repository. https://www.samba.org/samba/docs/man/manpages/vfs_recycle.8.html The mtime date is used to age the files in the recycle bin using 'find -mtime...', so that date has to be modified when put in the recycle bin. The access time is not updated on unRAID shares because of the way disks are mounted: mount -t xfs -o noatime,nodiratime /dev/md1 /mnt/disk1 I'm not sure what value the access date would have if it is not changed going to the recycle bin because the access date is not kept current. Edited May 7, 2017 by dlandon 1 Quote Link to comment
dlandon Posted May 7, 2017 Author Share Posted May 7, 2017 It looks like I could switch to not update the modify date (recycle:touch_mtime = 'No') , but update the access date (recycle:touch = 'Yes') and use that to purge the files. I would then use 'find -atime' to purge files from the recycle bin. Quote Link to comment
dlandon Posted May 7, 2017 Author Share Posted May 7, 2017 (edited) 56 minutes ago, dlandon said: It looks like I could switch to not update the modify date (recycle:touch_mtime = 'No') , but update the access date (recycle:touch = 'Yes') and use that to purge the files. I would then use 'find -atime' to purge files from the recycle bin. 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 remain unchanged. Files will be purged from the recycle bin when the access date/time (which is the deletion date/time) ages the file. Edited May 7, 2017 by dlandon 2 Quote Link to comment
graywolf Posted May 8, 2017 Share Posted May 8, 2017 Thank you so much. Greatly appreciate your looking into this and being receptive to changes. Quote Link to comment
Energen Posted May 15, 2017 Share Posted May 15, 2017 On 2/7/2017 at 6:26 PM, dlandon said: Ok. One last thing. Do this command: /etc/rc.d/rc.samba restart Just wanted to chime in that I had to do this step as well to get the recycle bin working. Don't know if there's a way to do this automatically when the plugin is installed, or if that's just bad form to do automatically, but seems to be a required step. Perhaps add the command to the plugin install info or something? Thanks for this, very useful plugin. Quote Link to comment
Recommended Posts
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.