- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Re: Can 'Recycle Bin' be enabled for CIFS and OS 6.1.2 on a 314?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can 'Recycle Bin' be enabled for CIFS and OS 6.1.2 on a 314?
I noticed a recycle.conf file in '/data/._share/media' containing:
25000,0
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Can 'Recycle Bin' be enabled for CIFS and OS 6.1.2 on a
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Can 'Recycle Bin' be enabled for CIFS and OS 6.1.2 on a 314?
Sent from my GT-N8000 using Tapatalk 4
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Can 'Recycle Bin' be enabled for CIFS and OS 6.1.2 on a
If anyone is interested, I will tell you how I did it.
EDIT.
The reason I want Recycle Bin and not use snapshots to restore previous versions is because I don't want the files actually deleted; I still want them accessible.
I use Plex Media Server to manage my content. When I am finished watching a tvshow, etc I delete the show and then it is moved into Recycle Bin. Other family members have the Recycle Bin as a source for their media sections. That way even though I deleted the file, it is still available for others to view. Then every few months I go ahead and permanently delete the media files in Recycle Bin that have been viewed by others.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Can 'Recycle Bin' be enabled for CIFS and OS 6.1.2 on a
I also would like to have Recycle Bin rather than snapshot on 6.1.4 can you post info on what to do step by step
That would be great
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Can 'Recycle Bin' be enabled for CIFS and OS 6.1.2 on a
/etc/frontview/samba/addons/addons.conf
-rw-r--r-- 1 admin admin 556 Nov 6 00:43 addons.conf
Then I edited it to include 2 of my existing shares that I want to have 'Recycle Bin' bin enabled:
[bitcasa]
vfs objects = recycle
recycle:repository = Recycle Bin
recycle:keeptree = yes
recycle:versions = no
[media]
vfs objects = recycle
recycle:repository = Recycle Bin
recycle:keeptree = yes
recycle:versions = no
Now you need to reload the config file. The only way I could figure out how to do this was go to the frontview web interface -> Shares and edit one of your current shares changing something so when you press OK, it will reload config file (I just kept toggling ftp on and off when testing).
Then, just run:
testparm
It should list all your shares and show the recycle: parameters for the sections you wanted.
Note, I use the name 'Recycle Bin', but you could choose another like '.trash'
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Can 'Recycle Bin' be enabled for CIFS and OS 6.1.2 on a
Swyped from my Galaxy Nexus using Tapatalk 4
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Can 'Recycle Bin' be enabled for CIFS and OS 6.1.2 on a
I will set this up in my NAS
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Can 'Recycle Bin' be enabled for CIFS and OS 6.1.2 on a
davexyz wrote: Thanks JMehring
I will set this up in my NAS
Your Welcome!
Let me know if you have any issues since it was some time ago I did this.
Just a few other notes:
- only add the extra configuration options per section I listed in post above as they will get appended to original sections
- I am not sure if the old 'Recycle Bin' script that automatically deletes items in 'Recycle Bin' is still hanging around in OS6. If it is be warned that items may start to disappear if you do not have the script configured properly. You can always name 'Recycle Bin' to something like .trash if you are concerned about this.
- If you want items in 'Recycle Bin' to be automatically deleted after some time, I will provide provide a modified version of the original OS4 'clean_recycle_bins' script you can use. The original ReadyNAS one never worked correct for me and ended up deleteing things sooner than I wanted so I fixed it to work the way I expected it. You would need to add it to a cron job.
- If you play are with the clean_recycle_bins' script, I suggest you make a snap shot of the share first and keep it for a while (at least a few reboots and a few days' to make sure things are not being deleted you don't want to have deleted; also maybe make a shorter test of 5 days to test initially. BE WARNED is you modify 'clean_recycle_bins' even more and are using it with a cron job, the older version will still be in spool, so make sure its removed and using your fresh version. I got stung by this when I upgraded firmware on OS4 and since their version was broken, it always ended up cleaning out my 'Recycle Bin' early if I was not careful.
- IMPORTANT. You never know if any custom modifications you make will survive an upgrade and most likely will not survive a factory reset. So I personally create a backup of every file I manually configure, add, install, etc in a share that is backed up so I can easily replicate my changes down the road. I will show example tree layout below. This allows me to quickly see which files need to be modified, changed etc if I do a factory reset and I always check after a firmware upgrade:
/data/backup/00_ReadyNAS_OS6/NOTES.txt
/data/backup/00_ReadyNAS_OS6/00_THINGS_TO_RESTORE_ON_UPGRADING/bitcasa_0.9.6.99_amd64.deb
/data/backup/00_ReadyNAS_OS6/00_THINGS_TO_RESTORE_ON_UPGRADING/restore_apt_packages.sh
/data/backup/00_ReadyNAS_OS6/etc/frontview/samba/addons/addons.conf
/data/backup/00_ReadyNAS_OS6//etc/frontview/recycle.conf
/data/backup/00_ReadyNAS_OS6/frontview/bin/clean_recycle_bins
/data/backup/00_ReadyNAS_OS6/root
/data/backup/00_ReadyNAS_OS6/etc/init.d/bitcasa
/data/backup/00_ReadyNAS_OS6/etc/init.d/Xvfb
/data/backup/00_ReadyNAS_OS6/etc/passwd
/data/backup/00_ReadyNAS_OS6/etc/group
/data/backup/00_ReadyNAS_OS6/apps/<BACKUP of all apps in /apps directory>
Here is the modified 'clean_recycle_bins' script that used to live in '/frontview/bin/clean_recycle_bins' on OS4:
#!/usr/bin/perl
#-------------------------------------------------------------------------
# Copyright 2007, NETGEAR
# All rights reserved.
#-------------------------------------------------------------------------
use lib qw( /frontview/lib );
use Frontview;
my $fv = new Frontview;
$fv->Account_get_info();
$fv->Service_get_info();
open(IN, "/etc/frontview/recycle.conf") || exit;
my = <IN>;
close(IN);
#if( $fv->{Service}{USER_HOME_DIRECTORY} &&
# $fv->{Service}{USER_HOME_DIRECTORY_RECYCLE} )
#{
# my $path;
# my $recycle_max_days = $fv->{Service}{USER_HOME_DIRECTORY_RECYCLE_MAX_DAYS};
# $recycle_max_days = $HOME_RECYCLE_AGE_LIMIT if( !$recycle_max_days );
# my $recycle_max_size = $fv->{Service}{USER_HOME_DIRECTORY_RECYCLE_MAX_SIZE};
# $recycle_max_size = $HOME_RECYCLE_MB_LIMIT if( !$recycle_max_size );
#
# printf("Max Days: %s\n", $recycle_max_days);
# printf("Max Size: %s\n", $recycle_max_size);
# printf("dirlist: \n\n");
#
# foreach my $user( sort keys %{ $fv->{Account}{user} } )
# {
# printf("user: $user\n");
# if( -d "$fv->{Account}{user}{$user}{home}/Recycle Bin" )
# {
# $path = $fv->{Account}{user}{$user}{home};
# printf("Path: %s\n-----------------------------------------------\n", $path);
# push , "$user!!$path!!$recycle_max_size!!$recycle_max_days";
# }
# }
#}
printf("dirlist: \n\n");
chomp;
printf("dirlist: \n\n");
foreach ()
{
chomp;
my ($share, $path, $mb_limit, $age_limit) = split('!!');
printf("Share: %s\n", $share);
if( $age_limit )
{
printf("Age Limit: %s\n", $age_limit);
system("find '$path/Recycle Bin' -type f -ctime +$age_limit -exec rm -rf {} \\; &>/dev/null");
}
if( $mb_limit )
{
printf("MB Limit: %s\n", $mb_limit);
my $recycle_mb = `du -sm '$path/Recycle Bin' 2>/dev/null`; chomp $recycle_mb;
if( $recycle_mb > $mb_limit )
{
my %files;
open(FIND, "find '$path/Recycle Bin' -type f -printf '%p!=!=%C@!=!=%s\n' |");
while(<FIND>)
{
chomp;
my ($name, $time, $size) = split('!=!=');
while( exists $files{$time} )
{
++$time;
}
$files{$time}{name} = $name;
$files{$time}{size} = $size;
}
close(FIND);
my $total_size = 0;
my $byte_limit = ($mb_limit * 1024 * 1024);
foreach my $time (reverse sort keys %files)
{
$total_size = ($total_size + $files{$time}{size});
if( $total_size > $byte_limit )
{
unlink("$files{$time}{name}") or system("rm -f \'$files{$time}{name}\'");
}
}
}
}
# Do a reverse sort so we can rmdir child directories before the parents.
open(FIND, "find '$path/Recycle Bin' -type d 2>/dev/null | sort -r |");
while(<FIND>)
{
chomp;
rmdir;
}
close(FIND);
}
close(IN);
And here is an example 'recycle.conf' file that used to live in '/etc/frontview/recycle.conf' on OS4. This example cleans out the 'Recycle Bin' in the share 'media' after stuff is over 360 days old and in 'media-other' after files are over 180 days old and will allow the 'Recycle Bin' to grow to any size.
media!!/c/media!!0!!360
media-other!!/c/media-other!!0!!180
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Can 'Recycle Bin' be enabled for CIFS and OS 6.1.2 on a
You have looked at this
I have "installed" the Recycle Bin in my Nas Just what I wanted . I have simple requirements for my NAS and snapshots were not necessarily the best option for me. It even works on attached usb drives. This is the way I use my NV+ V1 and NV+V2.
Brilliant
Thanks once again for this
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Can 'Recycle Bin' be enabled for CIFS and OS 6.1.2 on a
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Can 'Recycle Bin' be enabled for CIFS and OS 6.1.2 on a
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Can 'Recycle Bin' be enabled for CIFS and OS 6.1.2 on a
how do you access the config file on a RN 104 so you can apply the recycle bin config file?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Can 'Recycle Bin' be enabled for CIFS and OS 6.1.2 on a
An alternative is to download the config settings (zip file) to your PC, make the change in the zip file, and then upload the new configuration. The config backup/restore is also on the settings tab.
Either way the files need to use the linux formatting convention, which is not compatible with a PC. One way to preserve the formatting is to use a freeware editor called notepad++ (http://notepad-plus-plus.org/). DON'T use notepad or wordpad on your PC - it is possible to brick your NAS if you use the windows format.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Can 'Recycle Bin' be enabled for CIFS and OS 6.1.2 on a
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Can 'Recycle Bin' be enabled for CIFS and OS 6.1.2 on a
Do I just download the config settings (zip file) to my PC, create a new sub folder under /etc/frontview/samba/ called "addons" and in there create new config file "addons.conf"?
Wouldn't there be an issue creating the folder and files via windows?
How do I actually create the config file via command line?
When I connected to my RN104 via putty I dont see the samba subfolder under /etc/frontview.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Can 'Recycle Bin' be enabled for CIFS and OS 6.1.2 on a
As far as I know, the samba directory should be already present, even in the last version located at:
'/etc/frontview/samba'. If the 'addons' directory does not exist, create it.
cd /etc/frontview/samba
ls -l
# If addons directory does not exist, create it
mkdir addons
cd addons
# Create/edit the addons.conf file and add configuation information as incicated in the earlier post
vi addons.conf
If you need help using 'vi', search google; here is one of the links I found: http://www.howtoforge.com/faq/12_15_en.html
I have succussfully been using this technique with 6.1.2 to the latest 6.1.8
EDIT:
You stated that the '/etc/frontview/samba' directory does not exist for you. I am thinking it should be there since it hold many of the samba configuration files like:
cd /etc/frontview/samba
ls -l
total 36
drwxr-xr-x 1 admin admin 22 Mar 31 23:36 addons
-rw-r--r-- 1 admin admin 0 Jun 5 13:19 dfs.conf
-rw------- 1 admin admin 5585 Jun 5 13:19 Shares.conf
-rw-r--r-- 1 admin admin 303 Jun 5 13:16 Shares.conf.admin
-rw-r--r-- 1 115 guest 14 Jun 1 2013 smb.conf.CIFSFS
-rw-r--r-- 1 115 guest 599 Jun 1 2013 smb.conf.defaults
-rw-r--r-- 1 115 guest 32 Jun 1 2013 smb.conf.OS2
-rw-r--r-- 1 115 guest 84 Jun 1 2013 smb.conf.OSX
-rw-r--r-- 1 115 guest 14 Jun 1 2013 smb.conf.Samba
-rw-r--r-- 1 115 guest 0 Jun 1 2013 smb.conf.UNKNOWN
-rw-r--r-- 1 115 guest 0 Jun 1 2013 smb.conf.Vista
-rw-r--r-- 1 115 guest 0 Jun 1 2013 smb.conf.Win2K
-rw-r--r-- 1 115 guest 0 Jun 1 2013 smb.conf.Win2K3
-rw-r--r-- 1 115 guest 18 Jun 1 2013 smb.conf.Win95
-rw-r--r-- 1 115 guest 0 Jun 1 2013 smb.conf.WinNT
-rw-r--r-- 1 115 guest 0 Jun 1 2013 smb.conf.WinXP
-rw-r--r-- 1 115 guest 0 Jun 1 2013 smb.conf.WinXP64
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Can 'Recycle Bin' be enabled for CIFS and OS 6.1.2 on a
I went ahead created addons.conf file and edited it via VI to add the recycle bin config.
I tested it and the recycle bin is there now and works! Thank you so much for all your help!
Just one question though.
When you delete items from the NAS, in order for them to go to the recycle bin can they only be deleted via the readynas web interface? When I delete items via windows explorer on the NAS it always asks to permanently delete (thus not going to the recycle bin), but when I delete the files via the readynas web interface when browsing to the shares the recycle bin works.
Is there a way to have files deleted via windows on the NAS go to the recycle bin setup?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Can 'Recycle Bin' be enabled for CIFS and OS 6.1.2 on a
Personally I can not test this out since I do not have windows
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Can 'Recycle Bin' be enabled for CIFS and OS 6.1.2 on a
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Can 'Recycle Bin' be enabled for CIFS and OS 6.1.2 on a
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Can 'Recycle Bin' be enabled for CIFS and OS 6.1.2 on a 314?
Is there any updated information about enabling Recycle Bin on OS 6? Specifically OS 6.2.4 on a ReadyNAS Pro 2.
What the hell kind of developer thinks it is a good idea to remove useful functionality in exchange for less useful functionality?
I can't choose when snapshots are taken, I can't take multiple combinations of Snapshots like Hourly and Weekly, and Snapshots provide much less protection against accidently deleted files than the Recycle Bin does.
I just wanted to see if there is any new guide or information on enabling Recycle Bin on OS 6.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Can 'Recycle Bin' be enabled for CIFS and OS 6.1.2 on a 314?
You can use SSH to enable it as described earlier in the thread.
Snapshots make much more efficient use of space than a recycle bin and unlike with a cifs recycle bin with snapshots you can delete files using whichever protocol you want.
Seeing you have a Pro 2, you could backup your data and downgrade back to OS4: https://community.netgear.com/t5/Community-Add-ons/Downgrade-to-RAIDiator-x86-from-ReadyNAS-OS-notsu...