Initial version of ccollect-stats.sh from Daniel Aubry
(w/o header and everything)
This commit is contained in:
parent
3af14e5eac
commit
d0a6190203
1 changed files with 17 additions and 0 deletions
17
tools/ccollect-stats.sh
Normal file
17
tools/ccollect-stats.sh
Normal file
|
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in a new issue