www.nico.schottelius.org/software/ccollect/ccollect-0.6/tools/ccollect-stats.sh
Nico Schottelius 7a4e82d87a raw import of ccollect from unix.schottelius.org
Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
2009-05-26 23:45:19 +02:00

17 lines
344 B
Bash

#!/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