Deprecated: __autoload() is deprecated, use spl_autoload_register() instead in /home/pbuc/public_html/forum/mods/ext_phorummail/ezc/Base/src/ezc_bootstrap.php on line 36

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; KeyCAPTCHA_CLASS has a deprecated constructor in /home/pbuc/public_html/forum/mods/keycaptcha/keycaptcha.php on line 108
rsnapreport 1.3.1 not reporting properly
Welcome! » Log In » Create A New Profile

rsnapreport 1.3.1 not reporting properly

Posted by Anonymous 
rsnapreport 1.3.1 not reporting properly
December 10, 2013 07:58PM
Using rsnapshot 1.3.1 on Slackware64 13.37.  Recently implemented [url=http://rsnapreport.pl]rsnapreport.pl[/url] by cranking up verbose to 3, uncommented cmd_cp and pointing to /usr/X11R6/bin/cp in rsnapshot.conf.  After a full run with a fully populated rsnapshot.log file, this is all I get from it.  The data stats, as well as the time stats are definitely off.  Below is the output followed by a snippet of what's in rsnapshot.log.

SOURCE                          TOTAL FILES   FILES TRANS      TOTAL MB     MB TRANS   LIST GEN TIME  FILE XFER TIME
--------------------------------------------------------------------------------------------------------------------
/etc                                   2235             2          0.00         0.00   0.001 seconds   0.000 seconds
/home                                    26             3          0.00         0.00   0.001 seconds   0.000 seconds
/root                                    38             4          0.00         0.00   0.001 seconds   0.000 seconds
/var/log                               1836            29          0.00         0.00   0.001 seconds   0.000 seconds
192.168.16.16:/etc                     2839             3          0.00         0.00   0.001 seconds   0.000 seconds
192.168.16.16:/home                   40466           983          0.00         0.00   0.001 seconds   0.000 seconds
192.168.16.16:/root                     113             4          0.00         0.00   0.001 seconds   0.000 seconds
192.168.16.16:/usr/custom            236868            58          0.00         0.00   0.001 seconds   0.000 seconds
192.168.16.16:/var/log                 3611            40          0.00         0.00   0.001 seconds   0.000 seconds

/usr/X11R6/bin/rsync -achHAX --stats --delete --numeric-ids --relative
    --delete-excluded --rsync-path=rsync_wrapper.sh
    --exclude=/home/usern/.cache --exclude=/home/usern/.gvfs
    --exclude=/home/usern/unison.log --exclude=/home/usern/iMusic/
    --exclude=/home/usern/documents/pics/
    --exclude=/home/usern/documents/isoimages/
    --link-dest=/mnt/MD0_DATA/.snapshots/main_daily.0/defiant/ /etc
    /mnt/MD0_DATA/.snapshots/.sync/defiant/

Number of files: 2235 
Number of files transferred: 2
Total file size: 8.64M bytes
Total transferred file size: 15.81K bytes
Literal data: 15.81K bytes
Matched data: 0 bytes
File list size: 92.52K
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 108.64K
Total bytes received: 264

sent 108.64K bytes  received 264 bytes  16.75K bytes/sec
total size is 8.64M  speedup is 79.37

/usr/X11R6/bin/rsync -achHAX --stats --delete --numeric-ids --relative
    --delete-excluded --rsync-path=rsync_wrapper.sh
    --exclude=/home/usern/.cache --exclude=/home/usern/.gvfs
    --exclude=/home/usern/unison.log --exclude=/home/usern/iMusic/
    --exclude=/home/usern/documents/pics/
    --exclude=/home/usern/documents/isoimages/
    --link-dest=/mnt/MD0_DATA/.snapshots/main_daily.0/defiant/ /root
    /mnt/MD0_DATA/.snapshots/.sync/defiant/

Number of files: 26
Number of files transferred: 3
Total file size: 39.12K bytes 
Total transferred file size: 29.61K bytes
Literal data: 29.61K bytes
Matched data: 0 bytes
File list size: 877  
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds  
Total bytes sent: 30.65K
Total bytes received: 89
rsnapreport 1.3.1 not reporting properly
December 10, 2013 09:25PM
Found a snippet on the web at [url=http://giantdorks.org/alain/rsnapreport-pl-enhancements/]http://giantdorks.org/alain/rsnapreport-pl-enhancements/[/url] which explains why I would be seeing zeros for the "FILE XFER TIME" section.  I had assumed that this would be the time it took to rsync that particular backup, but in fact it is the time rsync took to transfer the file list to sync.  This does not explain why my transfer bytes is zero however.

On Tue, Dec 10, 2013 at 2:55 PM, Nelson <dimm0k < at > gmail.com ([email]dimm0k < at > gmail.com[/email])> wrote:
[quote] Using rsnapshot 1.3.1 on Slackware64 13.37.  Recently implemented [url=http://rsnapreport.pl]rsnapreport.pl[/url] by cranking up verbose to 3, uncommented cmd_cp and pointing to /usr/X11R6/bin/cp in rsnapshot.conf.  After a full run with a fully populated rsnapshot.log file, this is all I get from it.  The data stats, as well as the time stats are definitely off.  Below is the output followed by a snippet of what&#39;s in rsnapshot.log.

SOURCE                          TOTAL FILES   FILES TRANS      TOTAL MB     MB TRANS   LIST GEN TIME  FILE XFER TIME
--------------------------------------------------------------------------------------------------------------------
/etc                                   2235             2          0.00         0.00   0.001 seconds   0.000 seconds
/home                                    26             3          0.00         0.00   0.001 seconds   0.000 seconds
/root                                    38             4          0.00         0.00   0.001 seconds   0.000 seconds
/var/log                               1836            29          0.00         0.00   0.001 seconds   0.000 seconds
192.168.16.16:/etc                     2839             3          0.00         0.00   0.001 seconds   0.000 seconds
192.168.16.16:/home                   40466           983          0.00         0.00   0.001 seconds   0.000 seconds
192.168.16.16:/root                     113             4          0.00         0.00   0.001 seconds   0.000 seconds
192.168.16.16:/usr/custom            236868            58          0.00         0.00   0.001 seconds   0.000 seconds
192.168.16.16:/var/log                 3611            40          0.00         0.00   0.001 seconds   0.000 seconds

/usr/X11R6/bin/rsync -achHAX --stats --delete --numeric-ids --relative
    --delete-excluded --rsync-path=rsync_wrapper.sh
    --exclude=/home/usern/.cache --exclude=/home/usern/.gvfs
    --exclude=/home/usern/unison.log --exclude=/home/usern/iMusic/
    --exclude=/home/usern/documents/pics/
    --exclude=/home/usern/documents/isoimages/
    --link-dest=/mnt/MD0_DATA/.snapshots/main_daily.0/defiant/ /etc
    /mnt/MD0_DATA/.snapshots/.sync/defiant/

Number of files: 2235 
Number of files transferred: 2
Total file size: 8.64M bytes
Total transferred file size: 15.81K bytes
Literal data: 15.81K bytes
Matched data: 0 bytes
File list size: 92.52K
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 108.64K
Total bytes received: 264

sent 108.64K bytes  received 264 bytes  16.75K bytes/sec
total size is 8.64M  speedup is 79.37

/usr/X11R6/bin/rsync -achHAX --stats --delete --numeric-ids --relative
    --delete-excluded --rsync-path=rsync_wrapper.sh
    --exclude=/home/usern/.cache --exclude=/home/usern/.gvfs
    --exclude=/home/usern/unison.log --exclude=/home/usern/iMusic/
    --exclude=/home/usern/documents/pics/
    --exclude=/home/usern/documents/isoimages/
    --link-dest=/mnt/MD0_DATA/.snapshots/main_daily.0/defiant/ /root
    /mnt/MD0_DATA/.snapshots/.sync/defiant/

Number of files: 26
Number of files transferred: 3
Total file size: 39.12K bytes 
Total transferred file size: 29.61K bytes
Literal data: 29.61K bytes
Matched data: 0 bytes
File list size: 877  
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds  
Total bytes sent: 30.65K
Total bytes received: 89

[/quote]
rsnapreport 1.3.1 not reporting properly
October 18, 2014 08:09AM
try this one instead original rsnapreport.pl (also add [-h] key to [rsync_short_args] in rsnapshot .conf)
[code]
#!/usr/bin/env perl
# 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 | rsnapreport.pl | mail -s"SUBJECT" backupadm@adm.com
# don't forget the 2>&1 or your errors will be lost to stderr
################################
## Copyright 2006 William Bear & 2014 Alexey Furmanov
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## &#40;at your option&#41; any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
################################
use strict;
use warnings;
use English '-no_match_vars';

my $bufsz = 2;
my %bkdata=&#40;&#41;;
my @errors=&#40;&#41;;

sub pretty_print&#40;&#41;&#123;
my $ofh = select&#40;STDOUT&#41;;
$FORMAT_NAME="BREPORTBODY";
$FORMAT_TOP_NAME="BREPORTHEAD";
select&#40;$ofh&#41;;

foreach my $source &#40;sort keys %bkdata&#41;&#123;
if&#40;$bkdata&#123;$source&#125; =~ /error/i&#41; &#123; print "ERROR $source $bkdata&#123;$source&#125;"; next; &#125;
my $files = $bkdata&#123;$source&#125;&#123;'files'&#125; || "N/A";
my $filesc = $bkdata&#123;$source&#125;&#123;'files_created'&#125; || "N/A";
my $filest = $bkdata&#123;$source&#125;&#123;'files_tran'&#125; || "N/A";
my $filelistgentime = $bkdata&#123;$source&#125;&#123;'file_list_gen_time'&#125; || "N/A";
my $filelistxfertime = $bkdata&#123;$source&#125;&#123;'file_list_trans_time'&#125; || "N/A";
my $bytes= $bkdata&#123;$source&#125;&#123;'file_size'&#125; || "N/A";
my $bytest= $bkdata&#123;$source&#125;&#123;'file_tran_size'&#125; || "N/A";
my $bytess= $bkdata&#123;$source&#125;&#123;'bytes_sent'&#125; || "N/A";
my $bytesr= $bkdata&#123;$source&#125;&#123;'bytes_received'&#125; || "N/A";
$source =~ s/^&#91;^@&#93;+@//; # remove username
format BREPORTHEAD =
SOURCE |FILES: TOTAL CREATED XFERRED |SIZE:TOTAL XFERRED SENT RECEIVED |TIME,s:GEN XFER
-----------------------------------------------------------------------------------------------------------------------
.
format BREPORTBODY =
@<<<<<<<<<<<<<<<<<<<<<<<<<<<< @>>>>>>>> @>>>>>>> @>>>>>>> @>>>>>>>>> @>>>>>>>> @>>>>>>> @>>>>>>> @>>>>>>> @>>>>>>>
$source, $files, $filesc, $filest, $bytes, $bytest, $bytess, $bytesr, $filelistgentime, $filelistxfertime
.
write STDOUT;
&#125;
&#125;

sub nextLine&#40;$&#41;&#123;
my&#40;$lines&#41; = @_;
my $line = <>;
push&#40;@$lines,$line&#41;;
return shift @$lines;
&#125;

my @rsnapout = &#40;&#41;;

# load readahead buffer
for&#40;my $i=0; $i <$bufsz ; $i++&#41;&#123;
$rsnapout&#91;$i&#93; = <>;
&#125;

while &#40;my $line = nextLine&#40;@rsnapout&#41;&#41;&#123;
if&#40;$line =~ /^&#91;/w&#93;+/rsync/&#41; &#123; # find start rsync command line
my @rsynccmd=&#40;&#41;;
while&#40;$line =~ /s+$/&#41;&#123; # combine wrapped lines
$line =~ s/$//g;
$line .= nextLine&#40;@rsnapout&#41;;
&#125;
push&#40;@rsynccmd,split&#40;/s+/,$line&#41;&#41;; # split into command components
my $source = $rsynccmd&#91;-2&#93;; # count backwards: source always second to last
#print $source;
while&#40;$line = nextLine&#40;@rsnapout&#41;&#41;&#123;
# this means we are missing stats info
if&#40;$line =~ /^&#91;/w&#93;+/rsync/&#41;&#123;
unshift&#40;@rsnapout,$line&#41;;
push&#40;@errors,"$source NO STATS DATA"&#41;;
last;
&#125;
# stat record
if&#40;$line =~ /^total size iss+d+/&#41;&#123; last; &#125; # this ends the rsync stats record
elsif&#40;$line =~ /Number of files:s+&#40;d+&#41;/&#41;&#123;
$bkdata&#123;$source&#125;&#123;'files'&#125;=$1;
&#125;
elsif&#40;$line =~ /Number of created files:s+&#40;S+&#41;/&#41;&#123;
$bkdata&#123;$source&#125;&#123;'files_created'&#125;=$1;
&#125;
elsif&#40;$line =~ /Number of regular files transferred:s+&#40;S+&#41;/&#41;&#123;
$bkdata&#123;$source&#125;&#123;'files_tran'&#125;=$1;
&#125;
elsif&#40;$line =~ /Total file size:s+&#40;S+&#41;/&#41;&#123;
$bkdata&#123;$source&#125;&#123;'file_size'&#125;=$1;
&#125;
elsif&#40;$line =~ /Total transferred file size:s+&#40;S+&#41;/&#41;&#123;
$bkdata&#123;$source&#125;&#123;'file_tran_size'&#125;=$1;
&#125;
elsif&#40;$line =~ /File list generation time:s+&#40;S+&#41;/&#41;&#123;
$bkdata&#123;$source&#125;&#123;'file_list_gen_time'&#125;=$1;
&#125;
elsif&#40;$line =~ /File list transfer time:s+&#40;S+&#41;/&#41;&#123;
$bkdata&#123;$source&#125;&#123;'file_list_trans_time'&#125;=$1;
&#125;
elsif&#40;$line =~ /Total bytes sent:s+&#40;S+&#41;/&#41;&#123;
$bkdata&#123;$source&#125;&#123;'bytes_sent'&#125;=$1;
&#125;
elsif&#40;$line =~ /Total bytes received:s+&#40;S+&#41;/&#41;&#123;
$bkdata&#123;$source&#125;&#123;'bytes_received'&#125;=$1;
&#125;
elsif&#40;$line =~ /^&#40;rsync error|ERROR&#41;: /&#41;&#123; push&#40;@errors,"$source $line"&#41;; &#125; # we encountered an rsync error
&#125;
&#125;
elsif&#40;$line =~ /^&#40;rsync error|ERROR&#41;: /&#41;&#123; push&#40;@errors,$line&#41;; &#125; # we encountered an rsync error
&#125;

pretty_print&#40;&#41;;
if&#40;scalar @errors > 0&#41;&#123;
print "nERRORSn";
print join&#40;"n",@errors&#41;;
print "n";
&#125;
[/code]
Sorry, only registered users may post in this forum.

Click here to login