Dedup with beesd for BTRFS

for those interested in trying beesd with btrfs. this is my weekly cron script:
beesd output is saved and rotated&compressed under /var/log/bees.$UUID.$WEEK_NUMBER.log

#!/bin/ksh
# we assume that the cleanup happens weekly so the log files get saved under the week-of-the-year
# which allows to rotate logs on a yearly basis. adjust as needed...
TSTAMP=` date +%W`
# -v add extra infos when running manually.
if [[ $1 == "-v" ]]
then
        VERBOSE=true
else
        VERBOSE=false
fi

$VERBOSE  && set -x

cd /etc/bees
for config_file in *-*-*-*-*.conf
do
        uuid=`echo $config_file |cut -f1 -d. `
        uuid_mount=`grep $uuid /etc/fstab  | awk '{print $2}'`
        mylogs="/var/log/bees.${uuid}.${TSTAMP}.log"
        [[ -a /var/log/bees.${uuid}.*.log ]] && gzip /var/log/bees.${uuid}.*.log

        $VERBOSE && print parsing $uuid
        $VERBOSE && print saving logs at $mylogs
        size_before=`df -h $uuid_mount |awk '{print $2}'|tail -1`

        date >  $mylogs
        df -h $uuid_mount  >>$mylogs
        beesd "$uuid" >> $mylogs 2>&1
        date >>  $mylogs
        df -h $uuid_mount  >>$mylogs
        size_after=`df -h $uuid_mount |awk '{print $2}'|tail -1`

done