[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to restore BIOS-based backup on a UEFI machine



Alain D D Williams writes:

On Thu, Jan 14, 2021 at 04:41:50PM +0100, Jesper Dybdal wrote:
> I backup my Buster server simply as a (compressed, encrypted) cpio archive.
>
> Restoring it to a BIOS-based machine is simple: boot a rescue cd, partition
> the disk, restore all files, fix fstab if necessary, run update-grub and
> grub-install in a chroot environment.  That works.
>
> But if the machine should some day die and I can only find/buy a UEFI-only
> machine to restore it to, how do I do that?  And are there any precautions > I should take in advance (on the BIOS system, before creating backups that > may be needed on a future UEFI system) in order to make it easier to restore to
> a UEFI machine?

Standard precaution: Make sure your rescue disk boots on UEFI systems. For enhanced certainity, it has to be a physical system. I recently tried to test an UEFI live system in a virtual machine and it worked perfectly well, but degraded on a physical system: The GRUB menu choices could be used inside the VM but the physical system always booted the first entry...

[...]

If/when your machine dies I would suggest that the simplest thing is for you to do a completely fresh Debian install (which will get EUFI, etc, right) and then import your data from backups.

So what you need to do now is to ensure that your backups make it easy for you to do that:

* most of non system data is prob in /home So make that a separate cpio file

* ditto for other places where you have files that do not come from .deb

* keep a copy of /etc where it is easy to get hold of (maybe /home/etc.tar.gz)

* ensure that you know what has been installed: dpkg --list

[...]

I'd also recommend this approach. I prefer to track installed packages manually (in form of custom meta packages that is :) ), because this reduces them to a comprehensible set of actually interesting things -- I do not care if some previously unused library will not be installed on the new system.

There are some pitfalls of storing copies of system data in home directories (it could bypass read-restrictions for files like /etc/shadow), but for many single-user-machines this is less relevant.

I attempt to store only the files which I have modified. Mostly because the system's files are to some extent, hardware dependent (i.e. /etc/X11/xorg.conf if used is likely not to be portable across different GPU vendors etc.)

Finally out of curiosity: You mention using CPIO archives. Do you have any input files above 8 GiB for your backup processes? I always thought that to be the limit of CPIO? I am asking because I am using CPIO for backups, too. But here, it is explicitly only used for the comparatively small amount of "actually important data" -- i.e. things like VMs, mirrors, program setup files etc. all excluded and (to some extent) backed up by different programs (rsync and borgbackup, but I am still looking for better alternatives).

HTH
Linux-Fan

öö

Attachment: pgpvu8SU_AX2r.pgp
Description: PGP signature


Reply to: