If I understand you correctly, you have separate v3 and v4 backups
that you would like to merge.

You could actually do it -- and I have done similar but it requires
some effort and manual work... and hence there are risks of making mistakes..
The process goes something like this.

0. Turn off backuppc.

1. Convert the old v3 backup to a v4 backup using
   'BackupPC_migrateV3toV4' starting with a *separate* TopDir from the
   new v4

2. For any common md5sum filenames (and in particular if you have any
   with _N extensions -- this should be as rare as a blue moon since only
   happens if there is an md5sum collision), check if the file
   contents are identical -- again to see if you created any
   rare-as-a-blue moon collisions..

   (If there are, then you need to renumber with a _N extension and
   adjust the relevant attrib files for *any* of the relevant pc
   directories containing the file to reflect that but this is highly,
   highly unlikely)

3. Copy/move over the old v4 pool to the new v4 pool, ignoring
   identical file names since you just verified that they have the
   same contents.

4a. Option A: If you have common hosts to both the new and old backups,
   and you want to merge them:

   For each of the new v4 hosts in the pc directory, edit the
   corresponding 'backuppc' file and the backup number directories so
   that they start higher than the last old backup number for the
   corresponding hosts.

   Cat together the old and new backuppc files into a single combined
   backuppc file for the new host.

   Copy over each old pc host into the corresponding same-numbered new
   pc host.

4b. Option B: No common hosts or you are ok keeping them separate in
    which case rename the old hosts to <host>.old and add to the
    'hosts' file.

    Then just copy/move the old pc directory to the new one

5.  Run 'BackupPC_fsck -f -s' to fix the file counts in the new combined
    pool directory and in each host pc directory.

    For good measure, run 'BackupPC_fixupBackupSummary' for each of
    the clients.

    For good measure, run BackupPC_nightly

6.  Make sure all your config files are updated for v4

7.  Hope and pray all works (and that I didn't leave anything out) :)

If you are not comfortable with *any* of the above steps, then I would
just accept 2 different backups.

backuppc--- via BackupPC-users wrote at about 15:29:44 +0300 on Thursday, 
August 4, 2022:
 > Hi,
 > 
 > Thanks everyone for asking for clarifications. I clearly haven't been 
 > thinking enough about what I want to achieve ultimately.
 > 
 > Current situation:
 > 
 > - HDD with a complete BackupPC 3.x data directory (called __TOPDIR__ by the 
 > documentation), size 1.8 TB, that has not been used in three years. It 
 > should contain the backup data of about 8 clients if memory serves me right.
 > 
 > - BackupPC 4.x installation on Debian 11 that I started using 3 years ago. 
 > It is currently using some 1.x TB on a 4 TB RAID. Also has about 8 clients, 
 > 6 of which are the same hosts as on the old HDD, 2 are new hosts.
 > 
 > - The old HDD has backup data of 2 hosts that don't exist anymore.
 > 
 > Goals:
 > 
 > - Originally, I was thinking it would be real nice if I just could merge the 
 > two data directories, so I would end up with:
 > -- 6 clients that are the same in both installations and where backups from 
 > the old HDD would complement the backup history.
 > -- 2 clients that have only been in the new installation.
 > -- 2 clients that have only been in the old installation, so the backup 
 > history up to three years ago would be imported.
 > 
 > Obviously, the above goal is not achievable with reasonable efforts. So now 
 > I am thinking that the one thing that I really care about is this:
 > - Extract the three year old data of the two clients that are not known to 
 > the new installation.
 > 
 > Right now I am thinking that it would probably be easiest if I set up a 
 > Debian 10 VM, which comes with BackupPC 3.3.2, point that at the old data 
 > directory and use it to extract the data I want. Then I store that on one of 
 > my backed up clients so that it goes to the  BackupPC installation that I 
 > actually use.
 > 
 > BR,
 > Fabian
 > 
 > 
 > > Dave Sherohman via BackupPC-users <backuppc-users@lists.sourceforge.net> 
 > > hat am 04.08.2022 10:01 EEST geschrieben:
 > > 
 > >  
 > > On 8/4/22 07:44, backu...@kosowsky.org wrote:
 > > 
 > > > On Wed, Aug 3, 2022 at 2:31 PM backuppc--- via BackupPC-users <
 > > > backuppc-users@lists.sourceforge.net> wrote:
 > > >> I pulled a V3 pool off an old hard disk that I had wrongly assumed was
 > > >> broken. Now I would like to import as much data as possible into my 
 > > >> current
 > > >> V4 installation.
 > > > - What are you trying to accomplish?
 > > > - Do you only have the pool files or do you also have the pc backup
 > > >    directories?
 > > >
 > > > Really hard to answer the "how" if you don't explain the "what" and
 > > > "why" that you are seeking to accomplish...
 > > 
 > > I have to agree here.  You didn't mention the age of the backups on this 
 > > "old" disk, but importing it into your current pool strikes me as 
 > > something which would be carry a very high risk, while providing very 
 > > little reward.
 > > 
 > > If the backups on the "old" disk are from three days ago and taking new 
 > > backups of that data would take over a week to complete, then importing 
 > > them (or at least making them temporarily available to restore in some 
 > > fashion) seems reasonable; if they're from three years ago, then there's 
 > > considerably less potential benefit.
 > 
 > 
 > _______________________________________________
 > BackupPC-users mailing list
 > BackupPC-users@lists.sourceforge.net
 > List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
 > Wiki:    https://github.com/backuppc/backuppc/wiki
 > Project: https://backuppc.github.io/backuppc/


_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    https://github.com/backuppc/backuppc/wiki
Project: https://backuppc.github.io/backuppc/

Reply via email to