Web lists-archives.com

Re: Install & restore backup: what if I use LVM?




On Mon, Nov 19, 2018 at 04:31:45PM +0100, solitone wrote:
> 
> > On 19 Nov 2018, at 12:35, Jonathan Dowland <jmtd@xxxxxxxxxx> wrote:
> > 
> > On Mon, Nov 19, 2018 at 07:01:07AM +0100, solitone wrote:
> >> When I was playing with my disk's partition table I messed it up and
> >> lost everything. It was a dual boot system with macOS and Debian.
> >> 
> >> Thanks to the back2l utility I have a full backup of Debian. Now I
> >> would reinstall it and recover all the backed up files. However, I
> >> didn’t use LVM and now I would. In this case, would the adjustments
> >> needed from the original configuration be difficult?
> > 
> > This rather depends on how back2l functions. I can't find a reference to
> > it in the Debian package repositories. Can you point us at a URI that
> > describes it?
> 
> It simply results in a backup of the filesystem archived in a tarball.
> Once I reinstall Debian, I can restore the original configuration
> pulling in the original version of my files from that tarball. But
> this would work if the configuration were the same. If I install with
> LVM something would be different in terms of configuration, so some
> original config files wouldn’t be right, and I’d need some manual
> adjustement. The point is: how much?

LVM requires certain kernel modules and hooks to be present in
initramfs.
If your current installation lacks them, I suggest you to install lvm2
before the backup to save yourself the hassle of regenerating initramfs
after the restore.

You'll definitely need to adjust /etc/fstab, most likely
/etc/default/grub, and to update the bootloader.

Also, since it's you're using backup2l with tar backend, you'll need to
do something to restore all those capabilities extended attributes. A
hint here is:

grep setcap /var/lib/dpkg/info/*

Reco