Bootable linux backups without DD

05
2014-04
  • user259774

    I'd like to backup the state of my system. It only runs Manjaro.

    What I've done in the past when I need to install something else on the machine temporarily is just to dd the whole drive to a file and then back again when I want to restore it.

    However, that doesn't really make sense this time, because the whole root filesystem only has 17gb in use. My question is this: could I

    • boot from a linux live usb
    • mount my root filesystem (sda2) somewhere
    • copy all of its contents to external media
    • install windows
    • do what i need to with windows
    • boot another live linux system.
    • repartition the drive, format the largest partition as ext4
    • restore the original volume contents to the drive
    • boot up again

    And have it work as it did before I backed it up? Would it be basically functionally equivalent to the dd approach?

    Would I be missing an MBR, still? Would this be remedied by simply setting the new partition to "boot" in gparted when partitioning? Any other caveats?

  • Answers
  • MariusMatutiae

    What you are suggesting is correct, but I would also consider these simple points:

    0) You talked about 17GB of stuff on your / directory. Don't you have a larger /home directory with all of your stuff? If you do, how do you intend to proceed to preserve it?

    1) I have not understood whether you intend to keep the pc as a dual-boot machine, at the end of this. IF you do, read this point, otherwise just skip it.

    What's the point of resizing the disk after having installed Windows? You might as well do it with the live Linux distro before installing Windows. It sounds as though you are going to clear your whole hard disk. If you partition it before installing Windows, keeping in mind its future dual-boot use, then you are going to save yourself the hassle of resizing working partitions, which is both tedious and dangerous.

    2) After this whole exercise, you will have non-working grub and MBR. You can fix them both simultaneously from the live distro, before re-starting your system with the new manjaro distro.

    First, fix the grub: from the live, mount the partition to which you have re-installed manjaro, let's say /dev/sda2:

    sudo mount /dev/sda2 /mnt
    

    Then chroot to it, update grub, and leave the chroot:

    sudo chroot /mnt
    sudo update-grub
    exit
    

    Now it is time to fix the MBR: install on your Ubuntu live BootRepair; following the instructions of this Web page, your MBR will be correctly configured.


  • Related Question

    osx - How to make full (bootable) backup of HFS+ partition
  • Wildcat

    Some years ago (before switched to Mac) I have used Acronis True Image for creating/restoring full image of NTFS partitions.

    Now I'm on Mac. What I want to do is somehow fully backup my bootable HFS+ partition, store an image (not obligatory an image, because if I understand correctly CCC, for example, doesn't create images) on external USB drive, then do some repartitioning on a disk and finally restore backup in one of newly created partitions.

    I've noticed that it's possible to create/restore images using Disk Utility when booting from Mac OS X Install DVD. But I'm not sure about whether this tool creates full (bootable) backup or not.

    Do I need to use some 3rd party software like CCC or Disk Utility is just fine?


  • Related Answers
  • GJ.

    I have tried many solutions and came to the conclusion that the best one, by far, is SuperDuper.

    The free version should be fine if you're not in a hurry. The paid version can update your backup very quickly with the "smart update" feature.

  • Alex Reynolds

    Carbon Copy Cloner is free and easy, and will make disk images.

  • Sha0

    Do not attempt to backup a filesystem that is currently in use. That includes whichever filesystem you are currently booted from, for example. If you boot from the OS X Installation disc, you can certainly use Disk Utility to back up a partition on the internal HDD. The partition includes the filesystem, and the filesystem includes the "blessed" system folder and "blessed" startup file. As such, your image can be restored to a partition and will be bootable. No problem.

  • NReilingh

    Yup, you can restore to a bootable backup from an image created with Disk Utility. You can also use Disk Utility to restore from an existing partition.