php autocomplete input box | system time get in php | how to retrieve cookie value in php
 


 

How to Create Partition Image Backup and Restore Using Clonezilla



Image backup is a process which creates a copy of a disk partition or the entire disk. The result is a single file that is called an "image". This is the difference between image backup and file (or data) backup where selected files are copied.

Image backup is useful for:

  • System restore after a disk failure
  • System restore after a scheduled disc change
  • System restore after a failed upgrade of the the operating system
  • System restore after accidental deletion of important system files
  • System restore after malicious intervention (hacking, viruses etc)
  • and rarely for selective file recovery, provided that the images can be attached to the file system (mounted).

Clonezilla is a Free and Open Source bootable GNU/Linux distribution for disk or partition imaging and cloning. There are two versions available:

In this tutorial Clonezilla Live is used to create partition image and then to restore it in a virtual machine (Virtualbox).

Clonezilla can be used in almost every Opearting System (Microsoft Windows, Linux, Unix, Mac etc). For detailed features and some limitations read this.

Backup

This is the first step, where an image of disk partitions will be created (one image per each partition). So, insert Clonezilla Live CD and reboot your system. From boot menu (usually pressing DEL during boot), select boot from CD. Of course, you may use a bootable USB, if you prefer.

If you perform this operation for first time, create a (top level) directory in the disk you want your images to be saved (in my case clonezilla_athena) in sda8 partition.

After boot, you have to select language and keymap. Afterwards, select device-image option, which is more safe than device-device (directly copy from one disk to another)

(click the thumb for full image)

Where you want Clonezilla to save your image? To save this in local device select local_dev

(click the thumb for full image)

Clonezilla will scan your disks...

(click the thumb for full image)

Select the partition where your image will be saved. In my case sda8

(click the thumb for full image)

Select a directory in the previous selected partition (must be already existed)

(click the thumb for full image)

Select Expert mode

(click the thumb for full image)

Select saveparts to save a partition

(click the thumb for full image)

Give a name for your image. A directory will be created with this name, which will contain all image files.

(click the thumb for full image)

For example, when I save the boot partition, I give this name

(click the thumb for full image)

Select the local partition you want to save (for example sda1 which is my boot partition)

(click the thumb for full image)

Tell Clonezilla which tools you prefer to use to clone the selected partition

(click the thumb for full image)

Set extra parameters. Remark: -j2 Clone the hidden data between MBD and 1st partition is needed only when you clone your boot partition.

(click the thumb for full image)

Select compression level

(click the thumb for full image)

Set a number larger than 10 to avoid split image in multiple files

(click the thumb for full image)

In this step I set 2000000

(click the thumb for full image)

Select Yes, check the saved image

(click the thumb for full image)

Select the first option here

(click the thumb for full image)

just continue...

(click the thumb for full image)

just continue...

(click the thumb for full image)

just continue...

(click the thumb for full image)

If everything went OK you will see the folder you selected previously which contains your image

(click the thumb for full image)

And here are the contents of this folder (actually, more than one files have been created)

(click the thumb for full image)

Repeat this procedure for every other partition you want to save.

Restore

Here are the steps you have to follow, when you need to restore one or more saved partition images.

Again, insert Clonezilla Live CD (or a bootable USB) and reboot your system.

Restore performed in a virtual machine (just for demo purposes).

After boot, select language

(click the thumb for full image)

Don't touch keymap

(click the thumb for full image)

Start Clonezilla

(click the thumb for full image)

Select device-image option, which is more safe than device-device (directly copy from one disk to another)

(click the thumb for full image)

Where Clonezilla will find the saved image? The default option is loval_dev, but... (see next)

(click the thumb for full image)

... for this demo I used ssh_server (Clonezilla will be connected with host machine, using SSH, as saved image is located in host computer).

(click the thumb for full image)

Give SSH settings...

(click the thumb for full image)

Give SSH settings...(here the IP of the virtual machine)

(click the thumb for full image)

Give SSH settings...

(click the thumb for full image)

Give SSH settings...

(click the thumb for full image)

Give SSH settings...

(click the thumb for full image)

Give SSH settings...(here the IP of the host machine)

(click the thumb for full image)

Give SSH settings...

(click the thumb for full image)

Give SSH settings...

(click the thumb for full image)

Give the directory where saved images are located

(click the thumb for full image)

Give SSH password

(click the thumb for full image)

Select expert mode

(click the thumb for full image)

Select restoreparts

(click the thumb for full image)

After SSH connection, select the folder where the image is located

(click the thumb for full image)

Choose the partition image to restore

(click the thumb for full image)

Choose the target partition to be overwritten (ATTENTION!)

(click the thumb for full image)

Set advanced parameters (I have already created a partition table in virtual machine - otherwise first option would be necessary -g install Grub...)

(click the thumb for full image)

Set advanced parameters (I have already created a partition table in virtual machine)

(click the thumb for full image)

Select Yes, check the image before restoring

(click the thumb for full image)

First option here...

(click the thumb for full image)

Just continue...

(click the thumb for full image)

Just continue...

(click the thumb for full image)

Just continue...

(click the thumb for full image)

Your partition image is restored successfully!

Select Start_over to repeat this procedure for other partitions you want to restore (if any)

(click the thumb for full image)

When everything is done, select Poweroff

(click the thumb for full image)

After reboot the machine where you have restored your partition images you should have a fully functional computer! Good luck!

Related Posts

You may also be interested in

Εγγραφή!
Sign-up for our free email newsletter. Get updates when new tutorials and tips are published. You can unsubscribe anytime with a click.

Your comments are welcomed!

This site actively encourages commenting on any post. Comments are not pre-moderated, but this community does not tolerate direct or indirect attacks, name-calling or insults. Please, read terms of use and Comment Policy at privacy policy.

Easily Compress and/or Encrypt Files in Linux Using 7z (p7zip) Archiver How To Setup Virtualbox on Ubuntu 16.04