I want to experiment with my notebook and later recover my current installation. It has a 500Gb hard drive. Leap 15.3 and data is on three partttions that use only a portion of the total disk. Normally I would use “dd” to copy the whole 500GB. That takes a long time. Is there a way I can backup only the three partitions I need and not the rest of the drive so it’s all recoverable?
Well, dd the three partitions one by one.
Look at using autoyast to setup the operating system and files and just backup your data and configuration changes… far quicker…
I use cronopete to backup every 3 hours to a USB device of all my important stuff… less that an hour to be up and running on a fresh install, but I just use a script to re-create most of my changes.
Before I blunder into losing months of work can I confirm what I should do?
mount /dev/sdx /mnt (backup USB HD) dd if=/dev/sda of=/mnt/mbr.bu bs=512 count=1 dd if=/dev/sda2 of=/mnt/part2.bu (partition 1 is swap) dd if=/dev/sda3 of=/mnt/part3.bu
Then to restore I must create exactly same sized partitions for swap, partion 2 and parttion 3 then…
dd if=/mnt/mbr.bu of=/dev/sda dd if=/mnt/part2.bu of=/dev/sda2 dd if=/mnt/part3.bu of=/dev/sda3
Thanks in advance.
You did not show the present situation, thus we can not check against that. At least
Then, when you backup and retsore the MBR, then you will have the same partitioning as before. There is noo need to partition the disk in the same way as it was, because restoring the MBR will overwrite that (with the correct partition table).
And, there is no need to backup and restore a swap partition.
what i am doing: i use filebased backup with rsync. The tool luckybackup does very well in a nice gui.
Desaster recovery works fine like that: first you need to manually make the filesystem look like before (btrfs and subvolumes manually), after that, copy the files back and do chroot+ grub-install afterwards. You can thenn boot back into your working system.
There are good documentations in suse, how to make the base system look as it should. If you don’t want to bother with that, make on dd each time, the base changes (should nearly never happen) and recover the daily shot luckybackup afterwards into the restore.
Did this a few times, works very well.
Thank you Henk for a clear and simple explanation. Everything works again.