Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
deb12:migrate [2025/07/13 11:09] – [LVM2] Bernard Condraudeb12:migrate [2025/07/13 15:11] (current) Bernard Condrau
Line 1: Line 1:
 ====== Migrate data drives ====== ====== Migrate data drives ======
 +This guide shows how to migrate data drives from an old server to a new machine. This works when the old server is still accessible. My setup is 2 HDD -> RAID 1 -> LVM2 -> LUKS -> ext4 so it is very important to do all the steps in the correct sequence as outlined below. In my setup all data is mounted as /home.
 +
 +===== Old Server =====
 +==== File System ====
 +  - Unmount /home:<code>sudo umount /home</code>
 +  - You might need to force unmount. Alternatively, you may want to reboot the machine without LUKS to open the encrypted container.
 +
 +update-initramfs -u
 ===== LUKS ===== ===== LUKS =====
   sudo cryptsetup luksHeaderBackup /dev/mapper/vg_data2-lv_home --header-backup-file /path/to/backup/header.img   sudo cryptsetup luksHeaderBackup /dev/mapper/vg_data2-lv_home --header-backup-file /path/to/backup/header.img