Things to backup in linux after installation
Partition
mkdir ~/backup; cd ~/backup
sfdisk -d /dev/sdx > sfdisk_dump
fdisk -l /dev/sda > fdisk_listing
LVM metadata backup
vgcfgbackup; cp /etc/lvm/backup/vg_groupname ~/backup
LUKS header
-
locate partition(s) with luks using blkid
fdisk -l 2>&1 | cut -d' ' -f1 | grep "\/dev" | while read line; do blkid -p $line | grep crypto | cut -d: -f1; done
or using cryptsetupfdisk -l 2>&1 | cut -d' ' -f1 | grep "\/dev" | while read line; do cryptsetup isLuks $line; if [ $? = 0 ]; then echo "luks found on $line"; fi done
-
actual backup
cryptsetup luksHeaderBackup --header-backup-file luksHeaderBackup /dev/sdx#
NOTE: be sure to secure luksHeader by encrypting it using gpg -c luksHeaderBackup
No comment
Say something
Thank you
Your post has been submitted and will be published once it has been approved.
OK
OOPS!
Your post has not been submitted. Please return to the page and try again. Thank You!
If this error persists, please open an issue by clicking here.
OK