Peter Peter - 9 months ago 92
Linux Question

RSnapshot reports errors using "NO STATS DATA"

I configured RSnapshot on a WD My Book Live (2TB) and its working (at least that's what the logs say). I used the reporting tool from /usr/share/doc/rsnapshot/examples/utils/ to get human readable mail reports about the crontab triggered backup jobs.

While the backup jobs seem to work, the reports are a obviously missing information as you can see in this snipplet:

rsync://server:/vmail 13950 137 3687.81 20.31 0.052 seconds 0.000 seconds

/shares/rsnapshot/daily.0/ NO STATS DATA

The Question now is:

Beside the error at the bottom, which is my first and major problem and question, the FILE XFER TIME is also 0 for all backup jobs (I guess that the issues correlate).

I followed all instructions (see below) - what am I missing?

So what did I do so far:

*) The NAS runs Debian Squeeze (incl. squeeze-backports), Kernel Version is 2.6.32, PPC Architecture.

*) rsync version 3.0.3-2 (preinstalled), with /etc/rsyncd.conf:

pid file=/var/run/
lock file=/var/run/rsync.lock
log file=/var/log/rsync.log

read only=no
auth users=root

*) Installed rsnapshot 1.3.1-1 with /etc/rsnapshot.conf:

config_version 1.2
snapshot_root /shares/rsnapshot/
cmd_rm /bin/rm
cmd_rsync /usr/bin/rsync
cmd_logger /usr/bin/logger
interval daily 7
interval weekly 4
interval monthly 3
verbose 3
loglevel 3
logfile /var/log/rsnapshot.log
lockfile /var/run/
rsync_long_args --delete --numeric-ids --relative --delete-excluded --stats
backup rsync://server:/vmail/ backupOfServer/vmail/
backup ...
backup ...
backup ...

*) unpacked the report script and followed instructions in the script (most of which you can see in the config above):

# this script prints a pretty report from rsnapshot output
# in the rsnapshot.conf you must set
# verbose >= 3
# and add --stats to rsync_long_args
# then setup crontab 'rsnapshot daily 2>&1 | | mail -s"SUBJECT"
# don't forget the 2>&1 or your errors will be lost to stderr

*) and set up cron.d/rsnapshot:


30 3 * * * root /usr/bin/rsnapshot daily 2>&1 | /root/
0 3 * * 1 root /usr/bin/rsnapshot weekly 2>&1 | /root/
30 2 1 * * root /usr/bin/rsnapshot monthly 2>&1 | /root/

If you need any detailed or additional information, don't hesitate. We are happy to have daily reports of the backup at all, just the errors at the bottom are making us nervous.

Best Regards and thanks in advance,


Answer Source

The reason for this error was, that I did not uncomment the cmd_cp parameter. RSnapshot therefore used its build-in copy mechanism, which uses rsync.

This call of rsync was echoed to the output. The report script scans the output for calls to rsync and looks for transfer statistics, but the initial "copy" command does not produce such stats - therefore the error saying "NO STATS" for the source /daily.0

The solution is, to read the configuration file and follow the instructions:

# LINUX USERS:   Be sure to uncomment "cmd_cp". This gives you extra features.
# EVERYONE ELSE: Leave "cmd_cp" commented out for compatibility.
# See the README file or the man page for more details.
#cmd_cp          /bin/cp

Uncommenting the last line fixes the error... RTFM ;)