The <DataCollector install path>/apache-karaf-*/data directory automatically copied to data.bak, data.bak1 ... data.bak10.
Why and how these directory create?
This backup directory created by following script.
- <DataCollector install path>/scripts/karaffunctions
If <DataCollector install path>/apache-karaf-*/.lock file already exists when Data Collector start time (This means Data collector terminated abnormally), data.bak* directory will be created.
It will be created until 10th generation. The directory will be overwritten with shifting when it reached maximum generation.
If you want to change data.bak* generation number, please edit the following part of karaffunctions script and restart Data Collector.
----------------------
while [ -e $new_foldername ]
do
count=`expr $count + 1`
if [ $count -gt 10 ]; then
count=1
rm -rf $folder_to_rename$count
----------------------