Why is rsnapshot not giving stats, even with rsync --stats

3

I have been fighting with this for over 6 months now. I have rsnapshot set up to do periodic backups in cron and send a stats email but I am getting this content in the email:

ERRORS /home/ NO STATS DATA

I have run rsnapshot manually, and it seems that there is no stats data being returned from rsync, even though the --stats flag is given. Here is a transcript of a verbose manual rsnapshot run:

root@box:/home/user# /usr/bin/rsnapshot -v alpha
echo 28806 > /var/run/rsnapshot.pid 
/bin/rm -rf /media/backup/backups/alpha.6/ 
mv /media/backup/backups/alpha.5/ /media/backup/backups/alpha.6/ 
mv /media/backup/backups/alpha.4/ /media/backup/backups/alpha.5/ 
mv /media/backup/backups/alpha.3/ /media/backup/backups/alpha.4/ 
mv /media/backup/backups/alpha.2/ /media/backup/backups/alpha.3/ 
mv /media/backup/backups/alpha.1/ /media/backup/backups/alpha.2/ 
/bin/cp -al /media/backup/backups/alpha.0 /media/backup/backups/alpha.1 
/usr/bin/rsync -ax --stats --delete --numeric-ids --relative \
    --delete-excluded --exclude=.local/share/Trash --exclude=/Downloads \
    /home/ /media/backup/backups/alpha.0/box/ 
/usr/bin/rsync -ax --stats --delete --numeric-ids --relative \
    --delete-excluded --exclude=.local/share/Trash --exclude=/Downloads \
    /media/mybook/ /media/backup/backups/alpha.0/mybook/ 
touch /media/backup/backups/alpha.0/ 
rm -f /var/run/rsnapshot.pid 
root@box:/home/user# 

You can see from the transcript that rsync is being called with --stats, but no stats data is generated.

Can anyone see why?

mp035

Posted 2017-04-21T01:39:35.250

Reputation: 133

Answers

4

I ran into this problem as well. What fixed it for me was changing the "verbose" setting in rsnapshot.conf from 3 to 4.

It looks like this commit that added an rsync output to log capability also changed rsnapshot from always printing rsync output to only printing it if the "verbose" setting is 4 ("Extra Verbose") or higher.

https://github.com/rsnapshot/rsnapshot/commit/fdef85440bd0739c62fc509fb763dd1a5f688f73

HTH

Alex Dioso

Posted 2017-04-21T01:39:35.250

Reputation: 156