How to recover using a full backup?

Volker Wysk post at volker-wysk.de
Mon Sep 3 20:16:53 UTC 2018


Am Montag, 3. September 2018, 10:33:20 CEST schrieb Colin Watson:
> My usual strategy is to retain a copy of the UUID of the old file
> system, which doesn't involve any extra backup work; you'll have it
> somewhere in there, e.g. in /boot/grub/grub.cfg.  

The only places seem to be /etc/fstab and /boot/grub/grub.cfg. 

> Then after restoring
> files I grep for that in /etc and update any matching files to refer to
> the UUID of the newly-created file system.  (Note that this is not
> necessary in the case where you're simply reverting to an earlier state
> after a catastrophic sysadmin failure, since in that case you don't need
> to create a new file system.)

grub.cfg has this at the top:

-----snip-----
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
-----snip-----

So it should not be updated manually. Instead some grub-mkconfig invocation should be done... Or is it done by grub-install?

 
> After that, you've got it all - the procedure goes roughly like this:
> 
>   mount --rbind /dev /mnt/dev
>   mount --rbind /proc /mnt/proc
>   mount --rbind /sys /mnt/sys
>   chroot /mnt
>   update-initramfs -u
>   grub-install [possibly with suitable arguments]
>   update-grub

Okay. That's what I've been thinking about.

> Then unmount everything and reboot.  By definition you have recovery
> media at this point, so even if you do need to iterate a little bit it
> won't be too bad.

I don't get this. (Why unmount manually? Recovery media? iterate?)


Thanks!
Volker




More information about the ubuntu-users mailing list