Jump to content

FreeNas SMB Windows Share Recycle bin

ces160

Hi All, 

 

I need some help, I just created a FreeNas home server and I have no Idea what I'm doing. 

 

I have followed a guide online and have set up a Volume and data set, created a SMB share in Windows so now I can put files on the NAS. 

However, I know that my wife is going to delete something one day so I need to set it up so that if something is deleted out of the SMB shared folder on my windows PC the files go to a recycle bin on the FreeNas machine.

This way I can restore it if I need to. 

When setting up the share I checked the box "Export Recycle Bin" and the description says "deleted files are moved to a hidden .recycle in the root folder of the share; the .recycle directory can be deleted to reclaim space and is automatically recreated when a file is deleted".

This is exactley what I need. But i don't know how to access this .recycle folder to see what is in it and restore the contents if I need to, and what is the "root" folder of the share? Is this folder accessed via the FreeNas web UI or can is access it on the Windows machine?

 

Any help would be much appreciated, I have no clue what I'm doing. 

 

Thanks!

Link to comment
Share on other sites

Link to post
Share on other sites

9 minutes ago, ces160 said:

Hi All, 

 

I need some help, I just created a FreeNas home server and I have no Idea what I'm doing. 

 

I have followed a guide online and have set up a Volume and data set, created a SMB share in Windows so now I can put files on the NAS. 

However, I know that my wife is going to delete something one day so I need to set it up so that if something is deleted out of the SMB shared folder on my windows PC the files go to a recycle bin on the FreeNas machine.

This way I can restore it if I need to. 

When setting up the share I checked the box "Export Recycle Bin" and the description says "deleted files are moved to a hidden .recycle in the root folder of the share; the .recycle directory can be deleted to reclaim space and is automatically recreated when a file is deleted".

This is exactley what I need. But i don't know how to access this .recycle folder to see what is in it and restore the contents if I need to, and what is the "root" folder of the share? Is this folder accessed via the FreeNas web UI or can is access it on the Windows machine?

 

Any help would be much appreciated, I have no clue what I'm doing. 

 

Thanks!

 

I don't think so in windows if you delete something off a network share it just kind of vanishes

6600K - ASUS Z270i Gaming ITX - 8GB Corsair  Vengence LPX DDR4 2400MHZ - EVGA 1070SC - 120GB HyperX Savage SSD - CX430 PSU:|

PSU tier list- 

 

Link to comment
Share on other sites

Link to post
Share on other sites

10 minutes ago, ces160 said:

Hi All, 

 

I need some help, I just created a FreeNas home server and I have no Idea what I'm doing. 

 

I have followed a guide online and have set up a Volume and data set, created a SMB share in Windows so now I can put files on the NAS. 

However, I know that my wife is going to delete something one day so I need to set it up so that if something is deleted out of the SMB shared folder on my windows PC the files go to a recycle bin on the FreeNas machine.

This way I can restore it if I need to. 

When setting up the share I checked the box "Export Recycle Bin" and the description says "deleted files are moved to a hidden .recycle in the root folder of the share; the .recycle directory can be deleted to reclaim space and is automatically recreated when a file is deleted".

This is exactley what I need. But i don't know how to access this .recycle folder to see what is in it and restore the contents if I need to, and what is the "root" folder of the share? Is this folder accessed via the FreeNas web UI or can is access it on the Windows machine?

 

Any help would be much appreciated, I have no clue what I'm doing. 

 

Thanks!

 

you could try windows file history, see if that will backup network shares

6600K - ASUS Z270i Gaming ITX - 8GB Corsair  Vengence LPX DDR4 2400MHZ - EVGA 1070SC - 120GB HyperX Savage SSD - CX430 PSU:|

PSU tier list- 

 

Link to comment
Share on other sites

Link to post
Share on other sites

12 minutes ago, ces160 said:

Hi All, 

 

I need some help, I just created a FreeNas home server and I have no Idea what I'm doing. 

 

I have followed a guide online and have set up a Volume and data set, created a SMB share in Windows so now I can put files on the NAS. 

However, I know that my wife is going to delete something one day so I need to set it up so that if something is deleted out of the SMB shared folder on my windows PC the files go to a recycle bin on the FreeNas machine.

This way I can restore it if I need to. 

When setting up the share I checked the box "Export Recycle Bin" and the description says "deleted files are moved to a hidden .recycle in the root folder of the share; the .recycle directory can be deleted to reclaim space and is automatically recreated when a file is deleted".

This is exactley what I need. But i don't know how to access this .recycle folder to see what is in it and restore the contents if I need to, and what is the "root" folder of the share? Is this folder accessed via the FreeNas web UI or can is access it on the Windows machine?

 

Any help would be much appreciated, I have no clue what I'm doing. 

 

Thanks!

The path for the reycycle bin is \$Recycle.Bin\%SID% which is a hidden directory. Normally, you should be able to access it from the UI.

 

But from what I understand, your NAS machine is running FreeNas and not Windows, right? I'm not sure how the setting on your Windows terminal is dealt by your NAS.

 
~ Specs bellow ~
 
 
Windows 10 Pro 64-bit [UEFI]
CPU: Intel i7-5820k Haswell-E @ 4.5-4.7Ghz (1.366-1.431V) | CPU COOLER: Corsair H110 280mm AIO w/ 2x Noctua NF-A14 IPPC-2000 IP67 | RAM: G.Skill Ripjaws 4 32Gb (8x4Gb) DDR4 @ 2666mhz CL15 | MOBO: MSI X99S Gaming 7 ATX | GPU: MSI GTX 1080 Gaming (flashed "X") @ 2138-2151Mhz (locked 1.093V) | PSU: Corsair HX850i 850W 80+ Platinum | SSD's: Samsung Pro 950 256Gb & Samsung Evo 850 500Gb | HDD: WD Black Series 6Tb + 3Tb | AUDIO: Realtek ALC1150 HD Audio | CASE: NZXT Phantom 530 | MONITOR: LG 34UC79G 34" 2560x1080p @144hz & BenQ XL2411Z 24" 1080p @144hz | SPEAKERS: Logitech Z-5450 Digital 5.1 Speaker System | HEADSET: Sennheiser GSP 350 | KEYBOARD: Corsair Strafe MX Cherry Red | MOUSE: Razer Deathadder Chroma | UPS: PowerWalker VI 2000 LCD
 
Mac Pro 2,1 (flashed) OS X 10.11.6 El Capitan 64-bit (NAS, Plex, HTTP Server, Game Servers) [R.I.P]
CPUs: 2x Intel Xeon X5365 @ 3.3Ghz (FSB OC) | RAM: OWC 16Gb (8x2Gb) ECC-FB DDR2 @ 1333mhz | GPU: AMD HD5870 (flashed) | HDDs: WD Black Series 3Tb, 2x WD Black Series 1Tb, WD Blue 2Tb | UPS: Fortron EP1000
 
Link to comment
Share on other sites

Link to post
Share on other sites

Do you have a backup drive? You should be able to install bacula. Its an automated backup tool

             ☼

ψ ︿_____︿_ψ_   

Link to comment
Share on other sites

Link to post
Share on other sites

Why don't you just turn on snapshotting? Then you can just restore any file deleted.

System/Server Administrator - Networking - Storage - Virtualization - Scripting - Applications

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Eniqmatic said:

Why don't you just turn on snapshotting? Then you can just restore any file deleted.

Yeah, or to be honest I'd simply establish an incremental daily/nightly (even hourly, for folders that get a lot of editing/modifications, like documents etc) backup system and be done with it.

 
~ Specs bellow ~
 
 
Windows 10 Pro 64-bit [UEFI]
CPU: Intel i7-5820k Haswell-E @ 4.5-4.7Ghz (1.366-1.431V) | CPU COOLER: Corsair H110 280mm AIO w/ 2x Noctua NF-A14 IPPC-2000 IP67 | RAM: G.Skill Ripjaws 4 32Gb (8x4Gb) DDR4 @ 2666mhz CL15 | MOBO: MSI X99S Gaming 7 ATX | GPU: MSI GTX 1080 Gaming (flashed "X") @ 2138-2151Mhz (locked 1.093V) | PSU: Corsair HX850i 850W 80+ Platinum | SSD's: Samsung Pro 950 256Gb & Samsung Evo 850 500Gb | HDD: WD Black Series 6Tb + 3Tb | AUDIO: Realtek ALC1150 HD Audio | CASE: NZXT Phantom 530 | MONITOR: LG 34UC79G 34" 2560x1080p @144hz & BenQ XL2411Z 24" 1080p @144hz | SPEAKERS: Logitech Z-5450 Digital 5.1 Speaker System | HEADSET: Sennheiser GSP 350 | KEYBOARD: Corsair Strafe MX Cherry Red | MOUSE: Razer Deathadder Chroma | UPS: PowerWalker VI 2000 LCD
 
Mac Pro 2,1 (flashed) OS X 10.11.6 El Capitan 64-bit (NAS, Plex, HTTP Server, Game Servers) [R.I.P]
CPUs: 2x Intel Xeon X5365 @ 3.3Ghz (FSB OC) | RAM: OWC 16Gb (8x2Gb) ECC-FB DDR2 @ 1333mhz | GPU: AMD HD5870 (flashed) | HDDs: WD Black Series 3Tb, 2x WD Black Series 1Tb, WD Blue 2Tb | UPS: Fortron EP1000
 
Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, SaladFingers said:

Yeah, or to be honest I'd simply establish an incremental daily/nightly (even hourly, for folders that get a lot of editing/modifications, like documents etc) backup system and be done with it.

I don't know how familiar you are with FreeNAS/ZFS (I don't want to come across as condescending :)) but if you turn on ZFS snapshotting, it is decent protection against accidental file deletions, overwrites, corruptions etc. You can choose how often you snapshot and for how long you keep those snapshots for. You can then mount them to the CIFS/SMB share, and using the "Previous version" tab within the folder properties, you can go into any of the snapshots and restore any of the files to how they were at that particular time. Means you can literally restore a file in like 20 seconds.

System/Server Administrator - Networking - Storage - Virtualization - Scripting - Applications

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Eniqmatic said:

I don't know how familiar you are with FreeNAS/ZFS (I don't want to come across as condescending :)) but if you turn on ZFS snapshotting, it is decent protection against accidental file deletions, overwrites, corruptions etc. You can choose how often you snapshot and for how long you keep those snapshots for. You can then mount them to the CIFS/SMB share, and using the "Previous version" tab within the folder properties, you can go into any of the snapshots and restore any of the files to how they were at that particular time. Means you can literally restore a file in like 20 seconds.

Not very familiar :) Sounds like a great design.

 
~ Specs bellow ~
 
 
Windows 10 Pro 64-bit [UEFI]
CPU: Intel i7-5820k Haswell-E @ 4.5-4.7Ghz (1.366-1.431V) | CPU COOLER: Corsair H110 280mm AIO w/ 2x Noctua NF-A14 IPPC-2000 IP67 | RAM: G.Skill Ripjaws 4 32Gb (8x4Gb) DDR4 @ 2666mhz CL15 | MOBO: MSI X99S Gaming 7 ATX | GPU: MSI GTX 1080 Gaming (flashed "X") @ 2138-2151Mhz (locked 1.093V) | PSU: Corsair HX850i 850W 80+ Platinum | SSD's: Samsung Pro 950 256Gb & Samsung Evo 850 500Gb | HDD: WD Black Series 6Tb + 3Tb | AUDIO: Realtek ALC1150 HD Audio | CASE: NZXT Phantom 530 | MONITOR: LG 34UC79G 34" 2560x1080p @144hz & BenQ XL2411Z 24" 1080p @144hz | SPEAKERS: Logitech Z-5450 Digital 5.1 Speaker System | HEADSET: Sennheiser GSP 350 | KEYBOARD: Corsair Strafe MX Cherry Red | MOUSE: Razer Deathadder Chroma | UPS: PowerWalker VI 2000 LCD
 
Mac Pro 2,1 (flashed) OS X 10.11.6 El Capitan 64-bit (NAS, Plex, HTTP Server, Game Servers) [R.I.P]
CPUs: 2x Intel Xeon X5365 @ 3.3Ghz (FSB OC) | RAM: OWC 16Gb (8x2Gb) ECC-FB DDR2 @ 1333mhz | GPU: AMD HD5870 (flashed) | HDDs: WD Black Series 3Tb, 2x WD Black Series 1Tb, WD Blue 2Tb | UPS: Fortron EP1000
 
Link to comment
Share on other sites

Link to post
Share on other sites

Turn on snapshot and you should able to access folder/file history which allow you row back. I never really use recycle bin as SMB is messing i usually use it as backup. 

Magical Pineapples


 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Link to comment
Share on other sites

Link to post
Share on other sites

Thanks for all of the replies!

 

So if I wanted to turn on the snapshot feature, and keep say 15 days of a snapshots how would I set that up?

And do snapshots use the same amount of space as what is stored in the share? I have 10Tb of free space and have used 2tb already, will each snapshot be 2tb?

Thanks

Link to comment
Share on other sites

Link to post
Share on other sites

7 minutes ago, ces160 said:

Thanks for all of the replies!

 

So if I wanted to turn on the snapshot feature, and keep say 15 days of a snapshots how would I set that up?

And do snapshots use the same amount of space as what is stored in the share? I have 10Tb of free space and have used 2tb already, will each snapshot be 2tb?

Thanks

Go to Storage > Periodic Snapshot Tasks and add a new snapshot. It is pretty self explanatory when you look at the options but post here if you are unsure of anything, or check the documentation.

 

Snapshots only use up the changed space, which is one of the things that makes them so damn brilliant. So you have a 2tb volume, and between snapshots, only 1 word document changes. The snapshot size will only be a few KB in space, because that is all that has changed. Make sense? So if you have a volume you are snapshotting and nothing changes what so ever, snapshot size will be zero.

 

Edit: Updated correct location

Edited by Eniqmatic
Editing location

System/Server Administrator - Networking - Storage - Virtualization - Scripting - Applications

Link to comment
Share on other sites

Link to post
Share on other sites

5 minutes ago, ces160 said:

Thanks for all of the replies!

 

So if I wanted to turn on the snapshot feature, and keep say 15 days of a snapshots how would I set that up?

And do snapshots use the same amount of space as what is stored in the share? I have 10Tb of free space and have used 2tb already, will each snapshot be 2tb?

Thanks

Oh just to add, you can be smarter about the retention policies etc if you need to be. You can have multiple snapshots that happen at different frequencies and have different retentions.

System/Server Administrator - Networking - Storage - Virtualization - Scripting - Applications

Link to comment
Share on other sites

Link to post
Share on other sites

Just to give you an example, I have multiple snapshot syncs setup. 

From 9am-6pm on Monday-Friday, frequency 1 day, keep for 1 month

       This gives me a Daily snapshot that I can roll back to up to a month ago. This runs while I'm at work - snapshots usually don't have any overhead but this was my thinking when I set this up.

From 6pm to 6am on Monday-Friday, frequency 1 hour, keep for 1 week.

       These are the times I'm home after work and I am actively using my network, so I want the frequency higher so that I can recover files / changes from as recent as an hour. I feel like an hour's worth of work isn't too terrible. I didn't really want to keep 24 daily snapshots for a month.

 

I have a duplicate of the second one for Sat/Sun but it's all day long, since I off sat/sun.

 

To add some info, I have two arrays - a primary and a backup. 

So I have a replication task to replicate specific datasets from Primary to Backup. It's a backup of the data and snapshots, so if I delete something then it'll be deleted off the backup array, but I can recover files that've been deleted via snapshots. Now this doesn't protect me from a house fire, but it does if my primary array dies from 2 disks failing.

 

 

My largest automatic snapshot is 1.6MiB. This is likely my oldest daily snapshot (month).

 

 

Edit*: Oh yea Windows Previous Versions will detect these snapshots, so once you set this up you can right click any file or folder and click Previous Versions tab, and recover your data (assuming you're on at least Windows 7).

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×