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. P= ut that copy somewhere safe. 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. You can use any old host</di= v><div style=3D"font-family:Verdana;">on the network as a dummy to start= making backups. 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. 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. 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. 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. 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. 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. 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. = 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. 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. 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. 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). 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. 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. 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<---------------------------------------------------= -------------------</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; 0/0 &nbs= p; 290 2019-09-26 01:24:33 /.fstab (0416cfcbe01474d6f0526ffa= 5d890813)</div><div style=3D"font-family:Verdana;">drwxr-xr-x  = ; 0/0 &= nbsp; 0 2020-05-07 15:45:30 /.java/</div><div style=3D"font-= family:Verdana;">-rw------- 0/0 = ; 0 2019-09-26 01:05:24&= nbsp; /.pwd.lock (d41d8cd98f00b204e9800998ecf8427e)</div><div style=3D"f= ont-family:Verdana;">drwxr-x--- 0/1002 &nbs= p; 0 2026-03-26 13:55:12 /Back= upPC/</div><div style=3D"font-family:Verdana;">drwxr-xr-x &nb= sp; 0/0  = ; 0 2025-02-01 16:36:24 /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<------------------------------------------------------= ----------------</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 '/'. <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. Hostname is eas= y. 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. Then there is backup number. 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.= 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<------= ----------------------------------------------------------------</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; /proc&= nbsp; proc &n= bsp; defaults  = ; 0 0</div><div style=3D"font-family= :Verdana;">PARTUUID=3D6c586e13-01 /boot &nb= sp; vfat defaults &= nbsp; 0  = ; 2</div><div style=3D"font-family:Verdana;">PARTUUID=3D6c58= 6e13-02 / &nb= sp; ext4 defaults,noatime = ; 0 1</div><div style=3D"font-family= :Verdana;">PARTUUID=3D6c586e13-03 /var &nbs= p; ext4 defaults,n= oatime 0 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<----------------------------= ------------------------------------------</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. 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==--