18

I am running Ubuntu 20.04 and I have my entire dev environment set up on this. I need to make some hardware upgrades and need to reinstall Ubuntu.

However I would like to take backup of my entire Ubuntu machine with my development environment intact. How do I create a backup as an ISO file and reinstall it. Is that possible?

5
  • 1
    Gnome-Disks will make an image file, (,img), of your disk. It can be copied to a second disk and restored using Gnome-Disks, Etcher, Rufus, mkusb, etc, when needed. Other people swear by Clonezilla. Not sure you can make a bootable installer for it. I will be wachin this question just in case someone has an answer. Oct 1, 2020 at 4:53
  • 1
    I would use Clonezilla for this task, to create a compressed image (a directory with a number of files). See more details at this link. But you may feel that using mkusb / Disks is more straightforward. Both methods work. In both cases it is important that you test that your image is restorable and that you really know how to do it.
    – sudodus
    Oct 1, 2020 at 7:08
  • you can save your current packages and reinstall those with dpkg Oct 1, 2020 at 14:17
  • @ThorbjørnRavnAndersen Wouldn't you have to copy all the configuration files after that?
    – Andyc
    Oct 1, 2020 at 15:20
  • @Andyc Those would be in your home directory which should be transferred seperately. Oct 1, 2020 at 21:32

1 Answer 1

10

Ubuntu Operating System Reinstaller

Hopefully the following should suit your requirements even though it does not involve an ISO file.

Procedure.

enter image description here

Showing partitions created by mkusb persistent install.

  • Boot the mkusb drive in the computer who's OS you want to backup.

  • Open Gnome-Disks, (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 save the image to the usbdata partition of the persistent USB.

enter image description here

  • When it comes time to restore your OS, boot the USB in the Target computer and use the pancake icon to restore the image to the hard drive. The restore will overwrite everything on the target drive. Best to test the image before deleting the original OS.
6
  • Will this backup also the configuration files, that for some programs are in the /home/user directory? Or do you have to take care of that manually?
    – Andyc
    Oct 1, 2020 at 15:17
  • This will clone everything on the disk. Oct 2, 2020 at 0:19
  • how to backup from /home or another mounted partition? it's telling me that can't create an image because the disk is busy (mounted)
    – nima
    May 10, 2021 at 22:26
  • 1
    @novonimo: You must run Disks from a Live or Persistent USB, not from the drive you are cloning. You do not need to run it from the Target drive. See also: askubuntu.com/a/1336673/43926 May 11, 2021 at 1:29
  • thank you for your helpful post and answer.
    – nima
    May 11, 2021 at 10:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .