Create bootable backup system image

6,557

Solution 1

Creating Backup System Image of Bootable USB

  • Boot Live USB, plug in Source USB.

  • Open Gnome-Disks

  • Select the disk you wish to backup on the left.

  • Select the icon that looks like a stack of pancakes upper right.

enter image description here

  • Click "Create Disk Image" and enter a location where to save the image.

enter image description here

  • Use the pancake icon when you want to restore or clone the image to another drive.

Solution 2

Disks

I can confirm that it works to use Disks alias gnome-disks for this purpose. And it is easy to use in a correct way according to the instructions by C.S.Cameron.

Clonezilla

An alternative tool, that I use is Clonezilla.

  • Download the stable iso file and create a USB boot drive.
  • Boot into it and let the menu system guide you through the process.
  • You can clone directly to a new drive with at least the same size (not one single byte smaller).
  • But I prefer to create an image (in this case a directory with a set of files, where the big files are compressed).
  • Clonezilla is smart enough to only copy used blocks in the file systems, and skip free blocks. It will also skip swap partitions and unallocated drive space, but the boot sectors and partition table are copied (to separate small files in the Clonezilla image directory). This means that Clonezilla will be faster than a crude cloning tool like Disks, and the image will be smaller too.

I have used Clonezilla for years, and I am still using the 'Beginner Mode', which makes it fairly easy to do the correct thing every time. (I must admit that Disks is easier to use.)

Relevant advice for every method and tool, that you use for backup.

  • It is a good idea to check that you can restore from the image to a new drive. Otherwise you cannot be sure that the image can really be restored, and it might be too late when the original drive fails. So, get an extra drive with at least the same size as the original drive, and use the imaging tool [Disks or Clonezilla or ...] to restore from the image to that drive and test that the computer works as expected when the original drive is replaced by this new drive.

Warning

  • Never boot the computer with both the original drive and a cloned copy of it connected at the same time. If you do that, there will be confusion because there are pairs of identical partitions and file systems, and the boot system may choose to use them and write to them in a way, that both get damaged, so that they will no longer work.
Share:
6,557
Gerry Liebling
Author by

Gerry Liebling

Updated on September 18, 2022

Comments

  • Gerry Liebling
    Gerry Liebling over 1 year

    I have successfully installed 20.04 and done lots of customization. In the event of a tragedy I would not like to have to start all over again. Is there a simple way (suitable for us newbies) to create a bootable thumb drive image of the customized system, preferably (but not necessarily) including user files, that I could use to restore the system to its current state? I am running on a Dell XPS 410 desktop computer. My apologies if this has been answered previously. Thank you.

    • Meninx - メネンックス
      Meninx - メネンックス almost 4 years
      Welcome to Ubuntu. I use Gnome-Disks to create a Disk Image of the Bootable USB drives I wish to preserve. Open Disks. Select the disk you wish to backup on the left. Select the icon that looks like a stack of pancakes upper right, Click "Create Disk Image". Enter a location where to save the image. Use the pancake icon when you want to restore or clone the image to another drive.
  • Gerry Liebling
    Gerry Liebling almost 4 years
    Got error "Error unmounting file system Error unmounting /dev/sda5:target is busy (udisks-error-quark, 14) Do I need to do any special preparation of target USB flash drive?
  • Meninx - メネンックス
    Meninx - メネンックス almost 4 years
    @Gerry Liebling: You should be booting from a Live USB or internal drive, not from the Target USB you are are backing up. Confirm all partitions on Target USB are unmounted. (No little triangles on the bottom of the partitions).
  • Meninx - メネンックス
    Meninx - メネンックス almost 4 years
    I have been meaning to try Clonezilla aain, it is just that Disks is always as close as my index finger, no mater if I am using my desktop or a bootable USB, which is more likely +1.
  • sudodus
    sudodus almost 4 years
    @C.S.Cameron, Yes, and Disks is easy to use for a beginner. Later on, when the beginner wants to manage something more efficient (and slightly more difficult), Clonezilla will be there.
  • Tom
    Tom over 2 years
    You probably mean the source drive, not the target.