From d0a61902032191a9c61de1478099dc0a82c6e693 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 25 Jun 2007 12:00:05 +0200 Subject: [PATCH] Initial version of ccollect-stats.sh from Daniel Aubry (w/o header and everything) --- tools/ccollect-stats.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tools/ccollect-stats.sh 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 + + +