On 2021-01-14 07:41, 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?
(My knowledge of UEFI is almost non-existent, and my knowledge of grub
is very limited.)
I have a SOHO network with a few Debian workstations and a few FreeBSD
servers, all still BIOS/MBR.
Backup/ restore is one thing and migration is another. cpio(1) is a
tool for the former. Changing hardware/ firmware from BIOS to UEFI and
partitioning scheme from MBR to GPT involve the latter, and require
different tools and techniques.
Are you using a version control system (VCS) for system administration?
If not, I recommend it. Version control is a huge improvement over
ad-hoc methods and "sneaker net".
For each host, I create a VCS project and check out a working directory
under the root account on that host. The project includes a text file
with my system administration notes, a text file with a list of all
installed packages, and any configuration files that I have modified or
created. I also include anything else that might be of use, such as the
output of various diagnostic tools.
To migrate, I do a fresh install of the chosen OS onto a blank disk in
the new machine, install the VCS client, check out the old host project,
create a new host project, and proceed to install packages, restore/
edit configuration files, connect data, etc.. Plan carefully, backup
religiously, schedule an outage, and be prepared to back out/ restore if
the migration fails.
David