On Tue, May 5, 2026, at 12:09 PM, G.W. Haywood wrote:
> First I suggest that you make a copy of your backup drive on another
> medium of some sort.  Put that copy somewhere safe.  Next install a
> new version of BackupPC the same way that you installed it originally,
> for example if you used a distro package use the same distro package.
> At this stage don't try to connect the old backup drive (nor the copy)
> but simply get the BackupPC system working.  You can use any old host
> on the network as a dummy to start making backups.  To get you started
> set up the configuration to back up one file on it, say every hour or
> something like that.
> 
> Once you have the new BackupPC working, shut it down - so that now the
> BackupPC script isn't running.  Now edit the BackupPC 'hosts' file so
> that it contains the hosts that you had on the original system (if you
> can't remember them, the hostnames are the names of directories in the
> directory .../pc/ of the BackupPC backup data store).
> 
> At this point, if you started BackupPC, it could try to start backing
> up your hosts.  Presumably you won't want it to do that because you'll
> have individual configurations (for example in /etc/backuppc/pc/ [*])
> for each of your hosts, and before starting the backups you'll want to
> get those configuratons from a backup.  You can do that as follows:
> 
> Replace the 'new' backup store with your 'old' backup store.  I'll let
> you work out how to do that, from what you've written you're obviously
> capable of doing it.  When you've done it, you *could* start BackupPC,
> but you still don't want to start backups - you still don't have your
> old configurations.  However, you *can* now use the tools provided by
> BackupPC to get files and directories from the backup data store...

Yes, it has been over two months since this e-mail.  As you may recall from 
this list's e-mails I had to first deal with an issue of the most recent ubuntu 
includes a systemd setting that makes /etc/backuppc read only.  Identifying 
this as the problem for why I could not modify config.pl through the web 
interface took a while (thanks to Tomas for identifying the solution).

Then I had to get "any old host on the network" backing up with the new 
install.  Rather than "any old host", I got one of the two machines I mostly 
need backed up working, that being my network file server.  That also took a 
while (this is a home network and I am not always at home with a stretch of 
time to work on it).  I still want to get my daily-driver work machine backing 
up, so I wanted to follow the full advice here.

I have followed the instruction up to here.  Now...

> 'BackupPC_ls' lets you list the files in any directory from any backup
> of any share of any host.  It gives you an md5sum for each file listed.
> Here's an example, where I'm logged in as root on the backup server:
> 
> 8<----------------------------------------------------------------------
> 
> # su -c "/usr/local/BackupPC/bin/BackupPC_ls -h alpha -n 2235 -s Config /" 
> backuppc
> /:
> -rw-r--r--       0/0        290 2019-09-26 01:24:33  /.fstab 
> (0416cfcbe01474d6f0526ffa5d890813)
> drwxr-xr-x       0/0          0 2020-05-07 15:45:30  /.java/
> -rw-------       0/0          0 2019-09-26 01:05:24  /.pwd.lock 
> (d41d8cd98f00b204e9800998ecf8427e)
> drwxr-x---    0/1002          0 2026-03-26 13:55:12  /BackupPC/
> drwxr-xr-x       0/0          0 2025-02-01 16:36:24  /ImageMagick-6/
> ...
> ...
> 
> 8<----------------------------------------------------------------------
> 
> As you can see, BackupPC_ls (normally) has to be run under the ID of
> the backup user, usually 'backuppc' but of course that's configurable.
> You give it the host name, in this case 'alpha', the backup number, in
> this case 2235, the share name, in this case 'Config', and the name of
> the directory that you want to list, in this case '/'.  

Question: I have to pass three options to BackupPC-ls.  Hostname is easy.  I 
believe Sharename is easy since I use rsync and that is just the directory 
name, although actually, I don't know for sure what directory I specified.  
Then there is backup number.  I have no idea how to get this.

I poked around some, but came up empty.  Any suggestions?

TIA

> The output is
> a bit like that from 'ls -l' but you get md5sums for the files (not
> for directories).  In my example above I've given the full path to the
> BackupPC_ls utility, it will likely be different in your installation.
> If you can't remember the share names, they're in the numbered backup
> directories under the host name directory with 'f' prefixed to them.
> The file 'backups' in the top level of the host's directory shows you
> which backup numbers are full and which are incremental.
> 
> 'BackupPC_zcat' then lets you write the content of any file to stdout.
> You just give it the md5sum which BackupPC_ls provided for your file.
> Below I've recovered the file '.fstab' which has the md5sum '0416cf...':
> 
> 8<----------------------------------------------------------------------
> 
> # su -c '/usr/local/BackupPC/bin/BackupPC_zcat 
> 0416cfcbe01474d6f0526ffa5d890813' backuppc
> proc            /proc           proc    defaults          0       0
> PARTUUID=6c586e13-01  /boot           vfat    defaults          0       2
> PARTUUID=6c586e13-02  /               ext4    defaults,noatime  0       1
> PARTUUID=6c586e13-03  /var            ext4    defaults,noatime  0       1
> #
> 
> 8<----------------------------------------------------------------------
> 
> You can redirect stdout to a file of course.  That's all there is to it.
_______________________________________________
BackupPC-users mailing list
[email protected]
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