Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #202596 > unrolled thread

Install & restore backup: what if I use LVM?

Started bysolitone <solitone@mail.com>
First post2018-11-19 07:10 +0100
Last post2018-11-19 22:00 +0100
Articles 12 — 6 participants

Back to article view | Back to linux.debian.user


Contents

  Install & restore backup: what if I use LVM? solitone <solitone@mail.com> - 2018-11-19 07:10 +0100
    Re: Install & restore backup: what if I use LVM? Jonathan Dowland <jmtd@debian.org> - 2018-11-19 12:40 +0100
      Re: Install & restore backup: what if I use LVM? solitone <solitone@mail.com> - 2018-11-19 16:40 +0100
        Re: Install & restore backup: what if I use LVM? Reco <recoverym4n@enotuniq.net> - 2018-11-19 17:10 +0100
          Re: Install & restore backup: what if I use LVM? solitone <solitone@mail.com> - 2018-11-19 17:50 +0100
    Re: Install & restore backup: what if I use LVM? solitone <solitone@mail.com> - 2018-11-19 16:40 +0100
      Re: Install & restore backup: what if I use LVM? Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-11-20 00:30 +0100
        Re: Install & restore backup: what if I use LVM? Johann Spies <johann.spies@gmail.com> - 2018-11-20 07:30 +0100
          Re: Install & restore backup: what if I use LVM? Jonathan Dowland <jmtd@debian.org> - 2018-11-20 11:40 +0100
            Re: Install & restore backup: what if I use LVM? Reco <recoverym4n@enotuniq.net> - 2018-11-20 11:50 +0100
          Re: Install & restore backup: what if I use LVM? Pascal Hambourg <pascal@plouf.fr.eu.org> - 2018-11-20 22:50 +0100
    Re: Install & restore backup: what if I use LVM? Andy Smith <andy@strugglers.net> - 2018-11-19 22:00 +0100

#202596 — Install & restore backup: what if I use LVM?

Fromsolitone <solitone@mail.com>
Date2018-11-19 07:10 +0100
SubjectInstall & restore backup: what if I use LVM?
Message-ID<wVKUV-6Ad-5@gated-at.bofh.it>
Hi,

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?

Thanks  

[toc] | [next] | [standalone]


#202601

FromJonathan Dowland <jmtd@debian.org>
Date2018-11-19 12:40 +0100
Message-ID<wVQ4h-22S-1@gated-at.bofh.it>
In reply to#202596
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?


-- 

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Jonathan Dowland
⢿⡄⠘⠷⠚⠋⠀ https://jmtd.net
⠈⠳⣄⠀⠀⠀⠀ Please do not CC me, I am subscribed to the list.

[toc] | [prev] | [next] | [standalone]


#202614

Fromsolitone <solitone@mail.com>
Date2018-11-19 16:40 +0100
Message-ID<wVTOy-4rl-9@gated-at.bofh.it>
In reply to#202601
> On 19 Nov 2018, at 12:35, Jonathan Dowland <jmtd@debian.org> 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?

[toc] | [prev] | [next] | [standalone]


#202615

FromReco <recoverym4n@enotuniq.net>
Date2018-11-19 17:10 +0100
Message-ID<wVUhz-4Sh-5@gated-at.bofh.it>
In reply to#202614
On Mon, Nov 19, 2018 at 04:31:45PM +0100, solitone wrote:
> 
> > On 19 Nov 2018, at 12:35, Jonathan Dowland <jmtd@debian.org> 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

[toc] | [prev] | [next] | [standalone]


#202616

Fromsolitone <solitone@mail.com>
Date2018-11-19 17:50 +0100
Message-ID<wVUUh-571-7@gated-at.bofh.it>
In reply to#202615
> On 19 Nov 2018, at 16:59, Reco <recoverym4n@enotuniq.net> wrote:
> 
> 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.

Unfortunately I don’t have the system any longer (I’ve lost everything while performing
some risky partition resizing), so I’m late--I can’t install lvm2 and then backup. I can only rely on a backup that lacks those modules & hooks.


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

Uhmm... I forgot of this issue. I believe I’ll end up restoring just /home

[toc] | [prev] | [next] | [standalone]


#202613

Fromsolitone <solitone@mail.com>
Date2018-11-19 16:40 +0100
Message-ID<wVTOy-4rl-17@gated-at.bofh.it>
In reply to#202596
Another option would be:
(1) Install the system as it was (i.e. with physical partitions);
(2) Restore the backed up configuration/files.
(3) Move to LVM.

How cumbersome would be point 3?

[toc] | [prev] | [next] | [standalone]


#202625

FromPascal Hambourg <pascal@plouf.fr.eu.org>
Date2018-11-20 00:30 +0100
Message-ID<wW19n-Sg-3@gated-at.bofh.it>
In reply to#202613
Le 19/11/2018 à 16:34, solitone a écrit :
> Another option would be:
> (1) Install the system as it was (i.e. with physical partitions);
> (2) Restore the backed up configuration/files.
> (3) Move to LVM.
> 
> How cumbersome would be point 3?

Much more than install with LVM from the start.

[toc] | [prev] | [next] | [standalone]


#202630

FromJohann Spies <johann.spies@gmail.com>
Date2018-11-20 07:30 +0100
Message-ID<wW7HQ-5aG-1@gated-at.bofh.it>
In reply to#202625
On Tue, 20 Nov 2018 at 01:22, Pascal Hambourg <pascal@plouf.fr.eu.org> wrote:

> Much more than install with LVM from the start.

You can install LVM if you want, but it might be worth while to take
note that you loose all the data if the disk fails underneath.  I had
a bad experience using LVM including more than one disk and everything
was lost when the disk failed - even on the disk that did not fail.
Backups did help, but that was an experience that made me decide never
to use LVM again.

Regards
Johann
-- 
Because experiencing your loyal love is better than life itself,
my lips will praise you.  (Psalm 63:3)

[toc] | [prev] | [next] | [standalone]


#202635

FromJonathan Dowland <jmtd@debian.org>
Date2018-11-20 11:40 +0100
Message-ID<wWbBL-7F8-13@gated-at.bofh.it>
In reply to#202630
On Tue, Nov 20, 2018 at 08:21:04AM +0200, Johann Spies wrote:
>You can install LVM if you want, but it might be worth while to take
>note that you loose all the data if the disk fails underneath.  I had
>a bad experience using LVM including more than one disk and everything
>was lost when the disk failed - even on the disk that did not fail.
>Backups did help, but that was an experience that made me decide never
>to use LVM again.

Sadly you are blaming the wrong thing here. The correct thing to do
(after making sure you have a reliable backup system you trust) would be
not to use multiple physical disks underneath one LVM volume group.


-- 

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Jonathan Dowland
⢿⡄⠘⠷⠚⠋⠀ https://jmtd.net
⠈⠳⣄⠀⠀⠀⠀ Please do not CC me, I am subscribed to the list.

[toc] | [prev] | [next] | [standalone]


#202636

FromReco <recoverym4n@enotuniq.net>
Date2018-11-20 11:50 +0100
Message-ID<wWbLr-7II-1@gated-at.bofh.it>
In reply to#202635
	Hi.

On Tue, Nov 20, 2018 at 10:38:54AM +0000, Jonathan Dowland wrote:
> On Tue, Nov 20, 2018 at 08:21:04AM +0200, Johann Spies wrote:
> > You can install LVM if you want, but it might be worth while to take
> > note that you loose all the data if the disk fails underneath.  I had
> > a bad experience using LVM including more than one disk and everything
> > was lost when the disk failed - even on the disk that did not fail.
> > Backups did help, but that was an experience that made me decide never
> > to use LVM again.
> 
> Sadly you are blaming the wrong thing here. The correct thing to do
> (after making sure you have a reliable backup system you trust) would be
> not to use multiple physical disks underneath one LVM volume group.

It's perfectly OK to do so if one uses mirrored logical volumes.
Or LVM on top of mdadm.

Using LVM as JBOD is asking for trouble, of course.

Reco

[toc] | [prev] | [next] | [standalone]


#202644

FromPascal Hambourg <pascal@plouf.fr.eu.org>
Date2018-11-20 22:50 +0100
Message-ID<wWm4a-5TY-9@gated-at.bofh.it>
In reply to#202630
Le 20/11/2018 à 07:21, Johann Spies a écrit :
> 
> You can install LVM if you want, but it might be worth while to take
> note that you loose all the data if the disk fails underneath.

How is that different from when using plain partitions ?
If the disk fails then partitions are lost too.

[toc] | [prev] | [next] | [standalone]


#202622

FromAndy Smith <andy@strugglers.net>
Date2018-11-19 22:00 +0100
Message-ID<wVYOd-7Fw-5@gated-at.bofh.it>
In reply to#202596
Hello,

On Mon, Nov 19, 2018 at 07:01:07AM +0100, solitone wrote:
> 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?

Probably the differences will be small and it will mostly work,
however "mostly" can still result in a great deal of frustrating
debugging, so personally if I were you I'd:

- Install Debian again how I wanted, with LVM or whatever

- Configure the services again, possibly referring to (but not
  simply bulk-overwriting existing directory trees with) my backups

- Copy my data back into place from the backups

It's not as quick as "press a button, there, it's re-imaged", but it
avoids introducing new problems.

Cheers,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web