Working with CLC Server File Location recycle bins
Each CLC Server user has a dedicated recycle bin in each CLC Server File Location they have access to.
If non-administrative users should not be allowed to move data in CLC Server File System Locations to their recycle bins at all, then access to the CLC Server Command Line Tools should be restricted.
Moving data to a recycle bin
Any user allowed to use the CLC Server Command Line Tools can use the rm command to move data they have access to to their own recycle bin in the same File System Location that the data is stored in.
The default action of the rm command is to move specified data to a recycle bin. Adding the -d option results in the data being deleted from the system directly, i.e. without having to run a separate command to empty the recycle bin. Note however that if the option to restrict emptying recycle bins to just admin users has been checked in the CLC Genomics Server configuration, running the rmcommand with the -d option will not work for non-administrative users. The command will fail, and the specified data will neither be moved to the recycle bit nor deleted from the system. The failed action is noted in the CLC Server audit log, along with the reason for the failure.
Emptying recycle bins manually
Only members of the admin group can empty CLC Server recycle bins or restore data from CLC Server recycle bins using the CLC Server Command Line Tools commands (empty_recycle_bins and recycle_bin_restore, respectively). This is the case whether or not the option to restrict emptying recycle bins to just admin users has been checked in the CLC Genomics Server configuration.
Emptying recycle bins automatically
The CLC Server can be configured to automatically empty all recycle bins periodically. Alternatively, a script making use of clcserver commands in the form shown below could be run as a cronjob. This would allow automatic emptying of the recycle bins of some locations, but not others and/or the recycle bins of some users but not others.
clcserver -S <serverinfo> -P <portnumber> -U <adminusername> -W <password or token> -A empty_recycle_bins -t clc://server/$LOCATIONNAME
$LOCATIONNAME in the command shown should be replaced by the name of a CLC Server File System Location. Alternatively, the ID of the location can be provided. To empty the recycle bin for just a single user, add to the command -u followed by the username.
