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.

Samba Recycle Bin with VFS_Recycle

Featured Replies

Cannot figure out why the exclude_dir is not working for me. It appears to put deleted files in the BIN directory regardless of what I try. I tried various delimiters to no avail. Perhaps it's the rest of my config that is causing problems. Any takers?

 

Thanks.

 

 

I didn't solve mine either. In the end I just set up a cron job to delete everything after a day from BIN.

It solves the problem that I had of accidentally deleting something from a share :)

  • Replies 181
  • Views 85.4k
  • Created
  • Last Reply

Could this be made into a unmenu setup Joe? :-[

Somthing like the other things you did, so we can install and have a button that clears the bin(trash) directory.

I think it would be a nice addition for some of us that are afraid to make a mistake and wipe everything or not be able to have room becouse we forget about it.

 

Thank you, Sorry for the bother.

  • 3 weeks later...

Excuse my newbie ignorance, but does anyone have a step-by-step to get this working?

 

Im paranoid about deleting some of my files now and having them disappear for good.

 

I couldnt locate a sme-extra.conf file, so i created one in the samba directory, but when i rebooted it disappeared (so i had no BIN share).

 

Thanks

Excuse my newbie ignorance, but does anyone have a step-by-step to get this working?

 

Im paranoid about deleting some of my files now and having them disappear for good.

 

I couldnt locate a sme-extra.conf file, so i created one in the samba directory, but when i rebooted it disappeared (so i had no BIN share).

 

Thanks

The smb-extra.conf file should be created in your config folder on the flash drive. 

(located at /boot/config if logged in via telnet or on the system console)

 

Joe L.

  • 2 weeks later...

The smb-extra.conf file should be created in your config folder on the flash drive. 

(located at /boot/config if logged in via telnet or on the system console)

 

Doesnt appear to be there. can i just create a blank file and copy in the CODE snippet from other posts, or is there other structures in that file i should worry about?

  • 8 months later...

Does this recycle bin work on Beta 5 series of unraid?

It does for me.

  • 2 weeks later...

I'd really like to do this after stupidly deleting some files yesterday but I'm at a complete loss as to how this is done.

 

Unraid has been be very easy to use thusfar but this is kinda scary.

Make your /boot/config/smb-extra.conf file contain the following. You will likely have to create that file. This is exactly detailed in this post: http://lime-technology.com/forum/index.php?topic=5446.msg50769#msg50769

 

[bIN]

path = /mnt/user/BIN

read only = No

 

[global]

vfs objects = recycle

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

        recycle:keeptree = Yes

        recycle:touch = Yes

        recycle:versions = Yes

        recycle:exclude = *.tmp

        recycle:exclude_dir = /tmp

        recycle:noversions = *.doc

Yeah I saw the post and I do not understand that at all.

 

I watched the category5tv vids and they made this easy and it was but this is something that has gone right over my head.

 

How do you create the smb-extra.conf? Do I use notepad from my windows pc or do I have to somehow do it from the unraid box?

 

This would benefit from a video tutorial for folks like me.

You need to use a unix-friendly editor.

You need to use a unix-friendly editor.

 

SO I find a unix-friendly editor, create a file called smb-extra.conf copy this text

 

[bIN]

path = /mnt/user/BIN

read only = No

 

[global]

vfs objects = recycle

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

        recycle:keeptree = Yes

        recycle:touch = Yes

        recycle:versions = Yes

        recycle:exclude = *.tmp

        recycle:exclude_dir = /tmp

        recycle:noversions = *.doc

 

 

into it and save it to the flash drive config folder?

Correct.  I use TextPad, I'm sure others use something different.

 

You might want to add your SABNzb/download/* directory or any other "temp" directory that you don't want "protected" 

recycle:exclude_dir is comma delimited list.

 

Also, whenever you go to clear out your recycle bin (/mnt/user/BIN in the example), do it while connected to unraid via telnet/putty/console, etc and not via your windows machine.

 

Another point to realize, this only "protects" deletes from SMB connections, not any you do from the unraid prompt.

 

just set this up, and had a play... Very nice option to have!

Thank you.

I created the conf file and have rebooted my system but I dont see a /mnt/user/BIN folder and as far as I can del deletes are happening as normal.  Is there anything else I should be doing?

I created the conf file and have rebooted my system but I dont see a /mnt/user/BIN folder and as far as I can del deletes are happening as normal.  Is there anything else I should be doing?

 

Think you need to create the UserShare BIN first, then reboot

And are you doing the Deletes via SMB connections or directly on unraid (console, telnet, putty, etc)?

 

This only "protects" deletes done from via the SMB shares (deletes from Windows machines, etc)

 

I had created the user share previously but still nothing seems to happen. And yes, I was deleting via smb.  Is there any way to actually check to see if the conf is being used?

Try creating the directory manually, then create a bogus file on a share from a windows client, then delete it and see if there are files under the recycle bin or subdirectories under there.

installed this yesterday on 5.0 beta10

works a charm

didn't have to make the bin manually .. it just appeared

 

 

Did not work creating the dir manually.  Anyone have any other ideas? Are there any prerequisites that I may be missing?

Did not work creating the dir manually.  Anyone have any other ideas? Are there any prerequisites that I may be missing?

 

1. Telent/Console/Putty to the unRaid server

2. cd /boot/config

3. ls -l smb-extra.conf to ensure it is at that location

4. Do a vi smb-extra.conf check to ensure there isn't any ^M at the ends of the lines (if there are, you did not use a *nix friendly editor)

5. If there are ^M characters at the ends of the line, then delete them and save the file.

6. Reboot unRaid server or stop/start Samba

 

Try your test deletes and check if working.

 

If all still fails, post your syslog and your smb-extra.conf

 

I have been wanting to create an unMenu package to do this... will see if/when I get to it this weekend.

Nothing that pops out. About the only difference from what I have is

 

        recycle:exclude_dir = /mnt/user/tmp/*,/mnt/user/SABnzbd/download*

 

Archived

This topic is now archived and is closed to further replies.

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.