BackupPC-users

Re: [BackupPC-users] v3 to v4 oddity

2017-03-20 21:59:02
Subject: Re: [BackupPC-users] v3 to v4 oddity
From: Michael Huntley <michael AT huntley DOT net>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Mon, 20 Mar 2017 18:58:23 -0700

Oh, OK.

Checking it out......

mph

On March 20, 2017 6:32:30 PM Craig Barratt <cbarratt AT users.sourceforge DOT net> wrote:

Michael,

Oops - I see a bug in BackupPC_refCountUpdate when it tallies up all the reference counts for each backup.  It doesn't include the hybrid (migrated) backups.

Here's the diff I just pushed to git.

Craig

diff --git a/bin/BackupPC_refCountUpdate b/bin/BackupPC_refCountUpdate
index 0c2e027..aa1f9f9 100755
--- a/bin/BackupPC_refCountUpdate
+++ b/bin/BackupPC_refCountUpdate
@@ -410,7 +410,7 @@ sub updateHostRefCounts
             my $poolCntFileNew = sprintf("%s/poolCntNew.%d.%02x",
                                          $refCntDestDir, $compress, $refCntFile * 2);
             for ( my $i = 0 ; $i < @Backups ; $i++ ) {
-                next if ( $Backups[$i]{version} eq "" || $Backups[$i]{version} =~ /^[23]\./ );   # skip pre-V4
+                next if ( $Backups[$i]{version} eq "" || ($Backups[$i]{version} =~ /^[23]\./ && !-d $bkupRefCntDir) );
                 my $bkupNum = $Backups[$i]{num};
                 my $refCntBkupDir = "$TopDir/pc/$host/$bkupNum/refCnt";
                 my $poolCntHostFile = sprintf("%s/poolCnt.%d.%02x", $refCntBkupDir, $compress, $refCntFile * 2);


On Mon, Mar 20, 2017 at 6:10 PM, Michael Huntley <michael AT huntley DOT net> wrote:

ok -

I performed the update without any problem using BackupPC_migrateV3toV4 to create a hybrid environment.  I tested the changes and restores worked perfect.  Now many days on I find the attrib files are missing from the pool.

For giggles I decided to restore another file as a test, oh my!  Not there in the web gui.  So I check it out from the CLI:

ls:

attrib_1a0fbad6ac18950b56ec27f5884c5481  <-- it's here! (So I thought)

so I BackupPC_attribPrint:

BackupPC_attribPrint: cannot read attrib file attrib_1a0fbad6ac18950b56ec27f5884c5481 (1a0fbad6ac18950b56ec27f5884c5481)  <-- Much sadness

So I check, ls /var/lib/backuppc/cpool/1a/0e/1a0fbad6ac18950b56ec27f5884c5481:

ls: cannot access /var/lib/backuppc/cpool/1a/0e/1a0fbad6ac18950b56ec27f5884c5481: No such file or directory  <- more sadness

I know the files were there after the initial conversion, so some sort of maintenance must have removed them.  I'm going to revert to an earlier snapshot, convert a v3 backup, test a restore, and wait until tomorrow to see if the files are still there.

Can anyone else check this and confirm?

Cheers!

mph


------------------------------------------------------------------------------
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/

------------------------------------------------------------------------------
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>