Re: Restore backuppc installation (localhost) from existing backuppc backups

[email protected] Wed, 22 Jul 2026 16:38:33 -0400
Newsgroups gmane.comp.sysutils.backup.backuppc.general
Message-ID <[email protected]>
--===============4240986212310897603==
Content-Type: multipart/alternative;
 boundary=8181347af8e9e16059ddaff05ccb7af34a85d811

--8181347af8e9e16059ddaff05ccb7af34a85d811
Content-Type: text/plain
Content-Transfer-Encoding: 7bit



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.

--8181347af8e9e16059ddaff05ccb7af34a85d811
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html><html><head><title></title></head><body><div style=3D"fon=
t-family:Verdana;"><br></div><div style=3D"font-family:Verdana;"><br></d=
iv><div>On Tue, May 5, 2026, at 12:09 PM, G.W. Haywood wrote:</div><bloc=
kquote type=3D"cite" id=3D"qt" style=3D""><div style=3D"font-family:Verd=
ana;">First I suggest that you make a copy of your backup drive on anoth=
er</div><div style=3D"font-family:Verdana;">medium of some sort.&nbsp; P=
ut that copy somewhere safe.&nbsp; Next install a</div><div style=3D"fon=
t-family:Verdana;">new version of BackupPC the same way that you install=
ed it originally,</div><div style=3D"font-family:Verdana;">for example i=
f you used a distro package use the same distro package.</div><div style=
=3D"font-family:Verdana;">At this stage don't try to connect the old bac=
kup drive (nor the copy)</div><div style=3D"font-family:Verdana;">but si=
mply get the BackupPC system working.&nbsp; You can use any old host</di=
v><div style=3D"font-family:Verdana;">on the network as a dummy to start=
 making backups.&nbsp; To get you started</div><div style=3D"font-family=
:Verdana;">set up the configuration to back up one file on it, say every=
 hour or</div><div style=3D"font-family:Verdana;">something like that.</=
div><div style=3D"font-family:Verdana;"><br></div><div style=3D"font-fam=
ily:Verdana;">Once you have the new BackupPC working, shut it down - so =
that now the</div><div style=3D"font-family:Verdana;">BackupPC script is=
n't running.&nbsp; Now edit the BackupPC 'hosts' file so</div><div style=
=3D"font-family:Verdana;">that it contains the hosts that you had on the=
 original system (if you</div><div style=3D"font-family:Verdana;">can't =
remember them, the hostnames are the names of directories in the</div><d=
iv style=3D"font-family:Verdana;">directory .../pc/ of the BackupPC back=
up data store).</div><div style=3D"font-family:Verdana;"><br></div><div =
style=3D"font-family:Verdana;">At this point, if you started BackupPC, i=
t could try to start backing</div><div style=3D"font-family:Verdana;">up=
 your hosts.&nbsp; Presumably you won't want it to do that because you'l=
l</div><div style=3D"font-family:Verdana;">have individual configuration=
s (for example in /etc/backuppc/pc/ [*])</div><div style=3D"font-family:=
Verdana;">for each of your hosts, and before starting the backups you'll=
 want to</div><div style=3D"font-family:Verdana;">get those configuraton=
s from a backup.&nbsp; You can do that as follows:</div><div style=3D"fo=
nt-family:Verdana;"><br></div><div style=3D"font-family:Verdana;">Replac=
e the 'new' backup store with your 'old' backup store.&nbsp; I'll let</d=
iv><div style=3D"font-family:Verdana;">you work out how to do that, from=
 what you've written you're obviously</div><div style=3D"font-family:Ver=
dana;">capable of doing it.&nbsp; When you've done it, you *could* start=
 BackupPC,</div><div style=3D"font-family:Verdana;">but you still don't =
want to start backups - you still don't have your</div><div style=3D"fon=
t-family:Verdana;">old configurations.&nbsp; However, you *can* now use =
the tools provided by</div><div style=3D"font-family:Verdana;">BackupPC =
to get files and directories from the backup data store...</div></blockq=
uote><div style=3D"font-family:Verdana;"><br></div><div style=3D"font-fa=
mily:Verdana;">Yes, it has been over two months since this e-mail.&nbsp;=
 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 /e=
tc/backuppc read only.&nbsp; Identifying this as the problem for why I c=
ould not modify config.pl through the web interface took a while (thanks=
 to Tomas for identifying the solution).</div><div style=3D"font-family:=
Verdana;"><br></div><div style=3D"font-family:Verdana;">Then I had to ge=
t "any old host on the network" backing up with the new install.&nbsp; R=
ather than "any old host", I got one of the two machines I mostly need b=
acked up working, that being my network file server.&nbsp; That also too=
k a while (this is a home network and I am not always at home with a str=
etch of time to work on it).&nbsp; I still want to get my daily-driver w=
ork machine backing up, so I wanted to follow the full advice here.</div=
><div style=3D"font-family:Verdana;"><br></div><div style=3D"font-family=
:Verdana;">I have followed the instruction up to here.&nbsp; Now...<br><=
/div><div style=3D"font-family:Verdana;"><br></div><blockquote type=3D"c=
ite" id=3D"qt" style=3D""><div style=3D"font-family:Verdana;">'BackupPC_=
ls' lets you list the files in any directory from any backup</div><div s=
tyle=3D"font-family:Verdana;">of any share of any host.&nbsp; It gives y=
ou an md5sum for each file listed.</div><div style=3D"font-family:Verdan=
a;">Here's an example, where I'm logged in as root on the backup server:=
</div><div style=3D"font-family:Verdana;"><br></div><div style=3D"font-f=
amily:Verdana;">8&lt;---------------------------------------------------=
-------------------</div><div style=3D"font-family:Verdana;"><br></div><=
div style=3D"font-family:Verdana;"># su -c "/usr/local/BackupPC/bin/Back=
upPC_ls -h alpha -n 2235 -s Config /" backuppc</div><div style=3D"font-f=
amily:Verdana;">/:</div><div style=3D"font-family:Verdana;">-rw-r--r--&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0/0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; 290 2019-09-26 01:24:33&nbsp; /.fstab (0416cfcbe01474d6f0526ffa=
5d890813)</div><div style=3D"font-family:Verdana;">drwxr-xr-x&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp; 0/0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp; 0 2020-05-07 15:45:30&nbsp; /.java/</div><div style=3D"font-=
family:Verdana;">-rw-------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0/0&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 2019-09-26 01:05:24&=
nbsp; /.pwd.lock (d41d8cd98f00b204e9800998ecf8427e)</div><div style=3D"f=
ont-family:Verdana;">drwxr-x---&nbsp;&nbsp;&nbsp; 0/1002&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 2026-03-26 13:55:12&nbsp; /Back=
upPC/</div><div style=3D"font-family:Verdana;">drwxr-xr-x&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp; 0/0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp; 0 2025-02-01 16:36:24&nbsp; /ImageMagick-6/</div><div style=3D"f=
ont-family:Verdana;">...</div><div style=3D"font-family:Verdana;">...</d=
iv><div style=3D"font-family:Verdana;"><br></div><div style=3D"font-fami=
ly:Verdana;">8&lt;------------------------------------------------------=
----------------</div><div style=3D"font-family:Verdana;"><br></div><div=
 style=3D"font-family:Verdana;">As you can see, BackupPC_ls (normally) h=
as to be run under the ID of</div><div style=3D"font-family:Verdana;">th=
e backup user, usually 'backuppc' but of course that's configurable.</di=
v><div style=3D"font-family:Verdana;">You give it the host name, in this=
 case 'alpha', the backup number, in</div><div style=3D"font-family:Verd=
ana;">this case 2235, the share name, in this case 'Config', and the nam=
e of</div><div style=3D"font-family:Verdana;">the directory that you wan=
t to list, in this case '/'.&nbsp; <br></div></blockquote><div style=3D"=
font-family:Verdana;"><br></div><div style=3D"font-family:Verdana;">Ques=
tion: I have to pass three options to BackupPC-ls.&nbsp; Hostname is eas=
y.&nbsp; 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 direct=
ory I specified.&nbsp; Then there is backup number.&nbsp; I have no idea=
 how to get this.</div><div style=3D"font-family:Verdana;"><br></div><di=
v style=3D"font-family:Verdana;">I poked around some, but came up empty.=
&nbsp; Any suggestions?</div><div style=3D"font-family:Verdana;"><br></d=
iv><div style=3D"font-family:Verdana;">TIA</div><div style=3D"font-famil=
y:Verdana;"><br></div><blockquote type=3D"cite" id=3D"qt" style=3D""><di=
v style=3D"font-family:Verdana;">The output is</div><div style=3D"font-f=
amily:Verdana;">a bit like that from 'ls -l' but you get md5sums for the=
 files (not</div><div style=3D"font-family:Verdana;">for directories).&n=
bsp; In my example above I've given the full path to the</div><div style=
=3D"font-family:Verdana;">BackupPC_ls utility, it will likely be differe=
nt in your installation.</div><div style=3D"font-family:Verdana;">If you=
 can't remember the share names, they're in the numbered backup</div><di=
v style=3D"font-family:Verdana;">directories under the host name directo=
ry with 'f' prefixed to them.</div><div style=3D"font-family:Verdana;">T=
he file 'backups' in the top level of the host's directory shows you</di=
v><div style=3D"font-family:Verdana;">which backup numbers are full and =
which are incremental.</div><div style=3D"font-family:Verdana;"><br></di=
v><div style=3D"font-family:Verdana;">'BackupPC_zcat' then lets you writ=
e the content of any file to stdout.</div><div style=3D"font-family:Verd=
ana;">You just give it the md5sum which BackupPC_ls provided for your fi=
le.</div><div style=3D"font-family:Verdana;">Below I've recovered the fi=
le '.fstab' which has the md5sum '0416cf...':</div><div style=3D"font-fa=
mily:Verdana;"><br></div><div style=3D"font-family:Verdana;">8&lt;------=
----------------------------------------------------------------</div><d=
iv style=3D"font-family:Verdana;"><br></div><div style=3D"font-family:Ve=
rdana;"># su -c '/usr/local/BackupPC/bin/BackupPC_zcat 0416cfcbe01474d6f=
0526ffa5d890813' backuppc</div><div style=3D"font-family:Verdana;">proc&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /proc&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proc&nbsp;&n=
bsp;&nbsp; defaults&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</div><div style=3D"font-family=
:Verdana;">PARTUUID=3D6c586e13-01&nbsp; /boot&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vfat&nbsp;&nbsp;&nbsp; defaults&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; 2</div><div style=3D"font-family:Verdana;">PARTUUID=3D6c58=
6e13-02&nbsp; /&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp; ext4&nbsp;&nbsp;&nbsp; defaults,noatime&nbsp=
; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1</div><div style=3D"font-family=
:Verdana;">PARTUUID=3D6c586e13-03&nbsp; /var&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ext4&nbsp;&nbsp;&nbsp; defaults,n=
oatime&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1</div><div style=3D"=
font-family:Verdana;">#</div><div style=3D"font-family:Verdana;"><br></d=
iv><div style=3D"font-family:Verdana;">8&lt;----------------------------=
------------------------------------------</div><div style=3D"font-famil=
y:Verdana;"><br></div><div style=3D"font-family:Verdana;">You can redire=
ct stdout to a file of course.&nbsp; That's all there is to it.<br></div=
></blockquote><div style=3D"font-family:Verdana;"><br></div></body></htm=
l>
--8181347af8e9e16059ddaff05ccb7af34a85d811--


--===============4240986212310897603==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============4240986212310897603==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--===============4240986212310897603==--