Samba Recycle Bin with VFS_Recycle


Recommended Posts

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

Link to comment

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.

Link to comment
  • 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

Link to comment

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.

Link to comment
  • 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?

Link to comment
  • 8 months later...
  • 2 weeks later...

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

Link to comment

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.

Link to comment

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?

Link to comment

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.

 

Link to comment

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)

 

Link to comment

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

 

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.