Package: rsnapshot
Version: 1.4.1-1
Severity: grave
Tags: upstream patch

Hi,

I just noticed that my backups are broken since a while. rsnapshot happily makes
backups of an old state of its .sync directory. Symptoms on stderr are:

[snip]
----------------------------------------------------------------------------
rsnapshot encountered an error! The program was invoked with these options:
/usr/bin/rsnapshot sync 
----------------------------------------------------------------------------
ERROR: /usr/bin/rsync returned 0.09375 while processing /
WARNING: Rolling back "hdd/"
[/snip]

(Notice that it says it's Rolling back, thus I get lots of disk activity and
think that it does a backup. Also, the mtimes in the backup directory suggest as
well that everything works. Oh and I had this error in the past, too, without
any problems. Hence the severity.)

Google found the following upstream report on this bug:

 https://github.com/rsnapshot/sourceforge-issues/issues/8

And indeed I see in /usr/bin/rsnapshot that first in line 3921, result is set
via

  $result = $? >> 8;

and then line 3929 does (where the function get_retval() just divides by its
argument by 256). As you see in the output above, this results in $retval being
set to 0.09375.

  my $retval = get_retval($result);

The fix should be the following chunk of an otherwise weirdly wrong commit
upstream:

https://github.com/rsnapshot/rsnapshot/commit/778ab47d8eb4891f464677a0e26c38b186a376c8#diff-70276296f2bdcc3adb72b3d823d07361L3922

Cheers,
Uli
-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'testing-proposed-updates'), (50, 
'experimental'), (50, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.3.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages rsnapshot depends on:
ii  liblchown-perl  1.01-3+b1
ii  logrotate       3.8.7-2
ii  perl            5.22.1-8
ii  rsync           3.1.1-3

Versions of packages rsnapshot recommends:
ii  openssh-client [ssh-client]  1:7.1p2-2

rsnapshot suggests no packages.

-- Configuration Files:
/etc/logrotate.d/rsnapshot changed:
/var/log/rsnapshot.log /var/log/rsnapshot {
        rotate 6
        monthly
        compress
        missingok
}

/etc/rsnapshot.conf changed:
config_version  1.2
snapshot_root   /media/backup/
no_create_root  1
cmd_cp          /bin/cp
cmd_rm          /bin/rm
cmd_rsync       /usr/bin/rsync
cmd_logger      /usr/bin/logger
cmd_du          /usr/bin/du
cmd_rsnapshot_diff      /usr/bin/rsnapshot-diff
retain  daily   8
retain  weekly  5
retain  monthly 12
verbose         2
loglevel        3
logfile /var/log/rsnapshot.log
lockfile        /var/run/rsnapshot.pid
exclude kuja.in_home
exclude /proc
exclude /sys
exclude /tmp
exclude /var/tmp
exclude .ccache
exclude /dev/.udev
exclude /dev/pts
exclude /dev/shm
exclude /var/cache
link_dest       1
sync_first      1
backup  /               hdd/


-- no debconf information

Reply via email to