BackupPC-users

Re: [BackupPC-users] BackupPC_migrateV3toV4 failing

2017-06-16 00:26:44
Subject: Re: [BackupPC-users] BackupPC_migrateV3toV4 failing
From: Craig Barratt via BackupPC-users <backuppc-users AT lists.sourceforge DOT net>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Thu, 15 Jun 2017 21:25:41 -0700
Daniel,

It looks like it is reading a V3 file, and the file size from the attributes is bigger than how much data it read from the file.  This is probably due to some sort of disk data corruption.

At line 722 of /usr/share/BackupPC/lib/BackupPC/Lib.pm there is this code:

$md5->add(substr($$dataRef, $seekPosn, 131072));

You could try replacing that with this:

$md5->add(substr($$dataRef, $seekPosn, 131072)) if ( length($$dataRef) >= $seekPosn );

Craig

On Thu, Jun 15, 2017 at 9:54 AM, Daniel Berteaud <daniel AT firewall-services DOT com> wrote:

Just upgraded to BackupPC 4.1.3 on my CentOS 6 server. I'd like to migrate the whole pool from v3 to v4. Simulation (with -m flag) works as expected:


[root@gerard ~]# sudo -u backuppc /usr/share/BackupPC/bin/BackupPC_migrateV3toV4 -h xbmc -m
BackupPC_migrateV3toV4: migrating host xbmc backup #0 to V4 (approx 67839 files)
BackupPC_migrateV3toV4: migrating host xbmc backup #30 to V4 (approx 69166 files)
BackupPC_migrateV3toV4: migrating host xbmc backup #60 to V4 (approx 69884 files)
BackupPC_migrateV3toV4: migrating host xbmc backup #90 to V4 (approx 70058 files)
BackupPC_migrateV3toV4: migrating host xbmc backup #109 to V4 (approx 70307 files)
BackupPC_migrateV3toV4: migrating host xbmc backup #139 to V4 (approx 71128 files)

[...]

But with the -m, it fails immediatly:


[root@gerard ~]# sudo -u backuppc /usr/share/BackupPC/bin/BackupPC_migrateV3toV4 -h xbmc
BackupPC_migrateV3toV4: migrating host xbmc backup #0 to V4 (approx 67839 files)
BackupPC_migrateV3toV4: removing temp target directory /var/lib/BackupPC//pc/xbmc/0.v4
substr outside of string at /usr/share/BackupPC/lib/BackupPC/Lib.pm line 722.

Where could the error comes from ?


++

--

Logo FWS

Daniel Berteaud

FIREWALL-SERVICES SAS.
Société de Services en Logiciels Libres
Tel : 05 56 64 15 32
Visio : http://vroom.fws.fr/dani
www.firewall-services.com

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
<Prev in Thread] Current Thread [Next in Thread>

ADSM.ORG Privacy and Data Security by KimLaw, PLLC