I'd like to know how to:
of all the MBRs and all the PTs of all my disks to a file so I can easily back them up using rsync
or a comparable program.
I'd like to know how to:
of all the MBRs and all the PTs of all my disks to a file so I can easily back them up using rsync
or a comparable program.
Hah, that's pretty easy:
create a directory
/sysbackup
:copy the following script in an editor:
save it in
/usr/local/bin
(E.g. asmbr-pt-bck
)chmod +x /usr/local/bin/mbr-pt-bck
sudo mbr-pt-bck
/sysbackup/
is included in yourrsync
(or comparable) command.Alternatively,
/etc/rc.local
or equivalent systemd and auto-execute it at every boot.To restore any of the above is pretty easy too:
MBR:
PT:
First to a
cat /sysbackup/PartBackup-szHostName-dev-sda.txt
Then just do a:
and you'll get the parted rescue prompt, where you fill in the data from the above
cat