The recycle bin is configured with SUBSYSTEM CTFILE RECYCLE_BIN . This subsystem configuration option supports the following options:
Example
subsystem ctfile recycle_bin {
recycle_folder_name deleted_files
purge_frequency_minutes 60
max_file_age_days 30
max_folder_storage_size 1 gb
}
MONITORING
The statistic utility, ctstat supports a deleted_files option listing the total size and detail list of files currently in the recycle bin.
Example
ctstat -deleted_files -u ADMIN -p ADMIN -s FAIRCOMS -i 1 -h 1 -t
Thu Dec 9 15:01:48 2021
Total file size: 917500 for 4 file(s)
Deleted file of size 131071 deleted\1639081086.20211209\qatranrepl097.sup.992
Deleted file of size 131071 deleted\1639081086.20211209\qatranrepl097.sup.998
Deleted file of size 327679 deleted\1639081086.20211209\qatranrepl097.sup.1017
Deleted file of size 327679 deleted\1639081086.20211209\qatranrepl097.sup.1026
NEW SERVER FILES
Two new files are required for tracking inactive files in the recycle bin. RECBINDT.FCS and RECBINIX.FCS are transaction-controlled data and index files retaining data about the current recycle bin state. The data file contains a state record for each deleted file, and a state record that holds the total space in use by deleted files. The index enables the background thread to find files that were deleted from the oldest to newest timestamp.
REPLICATION AGENT CHANGES
The replication agent supports a configuration option to enable whether the agent uses the recycle bin any time it deletes a file on the target server. The ctreplagent.cfg option is delete_to_recycle_bin yes | no and is on by default.