diff --git a/tools/ccollect-stats.sh b/tools/ccollect-stats.sh new file mode 100644 index 0000000..5ce171b --- /dev/null +++ b/tools/ccollect-stats.sh @@ -0,0 +1,17 @@ +#!/bin/sh + + +if [ ! -e /tmp/ccollect-stats.lock ] +then + touch /tmp/ccollect-stats.lock + find /etc/ccollect/sources/ -type l | while read line + do + backupname=$(basename $(readlink $line)) + echo "====[Backup: $backupname]====" | tee -a /var/log/backup.log + du -sh $line/* | tee -a /var/log/backup.log + done + rm /tmp/ccollect-stats.lock +fi + + +