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


Groups > linux.debian.user > #187098

Re: Restore backup to KVM

From Reco <recoverym4n@gmail.com>
Newsgroups linux.debian.user
Subject Re: Restore backup to KVM
Date 2017-09-22 21:40 +0200
Message-ID <usBXS-1C1-25@gated-at.bofh.it> (permalink)
References <uso4y-1K3-11@gated-at.bofh.it> <uspjX-2Dw-13@gated-at.bofh.it> <usBEt-1vD-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


	Hi.

On Fri, Sep 22, 2017 at 09:10:28PM +0200, solitone wrote:
> On 22/09/17 08:08, Reco wrote:
> > Execute this on your source system.
> > 
> > grep MODULES /etc/initramfs-tools/initramfs.conf
> > 
> > If it says MODULES=most then you're in luck as it means your initrd
> > contains all kernel modules for all kinds of hardware.
> > And restoring from backup into QEMU-KVM means you only need to
> > reconfigure the bootloader.
> > 
> > > Is there a way to configure KVM so that it resembles my bare
> > > metal, and the test is significant?
> > 
> > That's highly unlikely. On x86-64 there are two QEMU device models
> > worthy of speaking, and that's Intel i440FX and Intel Q35 motherboards.
> > Chances are you have different hardware.
> > 
> > So, it *will* have different NIC, Video adapter *and* most importantly,
> > IDE/SATA/SCSI controller.
> > 
> > Using Debian and MODULES=most you have a luxury of not to think about
> > it.
> 
> Ok, I see, and it seems I'm in luck:
>
> ~$ grep MODULES /etc/initramfs-tools/initramfs.conf
> # MODULES: [ most | netboot | dep | list ]
> MODULES=most

No wonder. This is Debian default, and Debian is famous for sane
defaults.


> But now I don't know what to do next, since:
> 
> > > I would install a basic debian system in KVM, and then overwrite it
> > > with my backed up files. Is this approach correct?
> > 
> > No. Some (but not all) configuration files would differ. Some (but not
> > all) packages would differ.

That depends on what kind of backup you have.

1) An old school case - you backup is made by dump(8).

Make yourself a file representing virtual machine disk.
Apply parted/fdisk/whatever to make appropriate number of partitions
inside it. Create filesystems.
Mount these somewhere, invoke restore(8) as needed.
Fix boot/grub/grub.cfg or whatever configuration file of bootloader
you're using.
Dismount filesystems, try to boot in QEMU.

2) Your backup is made by rsync(1) or tar(1).

Make yourself a file representing virtual machine disk.
Apply parted/fdisk/whatever to make appropriate number of partitions
inside it. Create filesystems.
Mount these somewhere, invoke rsync(1)/tar(1) as needed.
Fix extended file attributes, capability labels, SELinux labels if any
etc. By hand, that is.
Fix boot/grub/grub.cfg or whatever configuration file of bootloader
you're using.
Dismount filesystems, try to boot in QEMU.

3) You don't know what is used to make your backups, but it has an agent
(amanda, bacula, etc).

Grab yourself a liveCD, boot it in QEMU.
Invoke appropriate backup agent.
Reboot into (hopefully) restored QEMU disk.

4) You don't want to know how it's made but it's called Clonezilla.

Boot Clonezilla in QEMU. Invoke restore. Watch it done. Reboot.

5) It's all complex and confusing, the backup is done by dd'ing block
devices.

dd it back in QEMU disk file, try to boot. It may even work.

Reco

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Restore backup to KVM solitone <solitone@mail.com> - 2017-09-22 06:50 +0200
  Re: Restore backup to KVM Reco <recoverym4n@gmail.com> - 2017-09-22 08:10 +0200
    Re: Restore backup to KVM solitone <solitone@mail.com> - 2017-09-22 21:20 +0200
      Re: Restore backup to KVM Reco <recoverym4n@gmail.com> - 2017-09-22 21:40 +0200
        Re: Restore backup to KVM solitone <solitone@mail.com> - 2017-09-24 11:00 +0200
          Re: Restore backup to KVM <tomas@tuxteam.de> - 2017-09-24 11:20 +0200
          Re: Restore backup to KVM Reco <recoverym4n@gmail.com> - 2017-09-24 12:00 +0200
            Re: Restore backup to KVM solitone <solitone@mail.com> - 2017-09-25 21:10 +0200
              Re: Restore backup to KVM Reco <recoverym4n@gmail.com> - 2017-09-26 08:50 +0200
            Re: Restore backup to KVM solitone <solitone@mail.com> - 2017-09-25 21:20 +0200
              Re: Restore backup to KVM Reco <recoverym4n@gmail.com> - 2017-09-26 08:50 +0200
                Re: Restore backup to KVM solitone <solitone@mail.com> - 2017-09-26 13:10 +0200
                Re: Restore backup to KVM solitone <solitone@mail.com> - 2017-09-26 13:20 +0200
                Re: Restore backup to KVM Reco <recoverym4n@gmail.com> - 2017-09-26 17:40 +0200
                Re: Restore backup to KVM solitone <solitone@mail.com> - 2017-09-26 21:20 +0200
                Re: Restore backup to KVM solitone <solitone@mail.com> - 2017-09-26 21:50 +0200
                Re: Restore backup to KVM Reco <recoverym4n@gmail.com> - 2017-09-27 09:00 +0200
                Re: Restore backup to KVM "Thomas Schmitt" <scdbackup@gmx.net> - 2017-09-27 09:50 +0200
                Re: Restore backup to KVM Reco <recoverym4n@gmail.com> - 2017-09-27 10:40 +0200
                Re: Restore backup to KVM solitone <solitone@mail.com> - 2017-09-27 14:10 +0200
                Re: Restore backup to KVM solitone <solitone@mail.com> - 2017-09-27 19:00 +0200
                Re: Restore backup to KVM Reco <recoverym4n@gmail.com> - 2017-09-28 09:00 +0200
                Re: Restore backup to KVM solitone <solitone@mail.com> - 2017-09-29 06:40 +0200
                Re: Restore backup to KVM Reco <recoverym4n@gmail.com> - 2017-09-29 08:40 +0200
                Re: Restore backup to KVM Reco <recoverym4n@gmail.com> - 2017-09-30 13:10 +0200
                Re: Restore backup to KVM solitone <solitone@mail.com> - 2017-09-30 15:50 +0200
                Re: Restore backup to KVM Reco <recoverym4n@gmail.com> - 2017-09-30 17:00 +0200

csiph-web