Home > File System, Hardware, Live CDs, Software Installation > Using Clonezilla with FreeNAS or Network Share to Backup a Hard Disk

Using Clonezilla with FreeNAS or Network Share to Backup a Hard Disk


If you’ve used Symantec Ghost http://en.wikipedia.org/wiki/Symantec_Ghost or Acronis True Image http://en.wikipedia.org/wiki/Acronis_True_Image then you will know how useful they are for making images of computer hard disks. Great for backing up all your data or even for disaster recovery. The down side is they are both expensive programs to buy and for us Linux users, not free (as in beer or as in speech).

Clonezilla http://en.wikipedia.org/wiki/Clonezilla is in my view as good as, if not better than, the closed source competition and is highly regarded by IT professionals. I use Clonezilla regularly to image PCs before doing a distribution upgrade and I image both Linux and Windows partitions. I also use it for backing up hard disk and for migrating data between disks. For the latter I use Clonezilla along with GParted Live http://gparted.sourceforge.net/livecd.php. to resize partitions after the cloned image is restored to a new (larger) hard disk.

Because it runs from a ‘live’ CD (ISO image obtainable from http://tinyurl.com/c2myn8) and will read most hard disk formats including NTFS, Clonezilla is OS agnostic. It can backup at partition level to another hard disk or to a USB hard disk, and as we shall see it can also back up to a network share, or in our case to a FreeNAS storage server*.

*See my earlier blog posts on installing and configuring FreeNAS http://preview.tinyurl.com/2eglwrm and http://preview.tinyurl.com/2978jqv .

Cloning a Hard Disk

Insert the Clonezilla ‘Live CD’ and boot the PC off the CD.

The following menu will be displayed.

Select the default option, and press the Enter key. Clonezilla will boot.

Eventually displaying the following “choose language” screen.

Select your language, then press the Enter key.

The “configuring console data” screen will appear

Accept the default and press the Enter key.

You will now be given two options, as we don’t want the command prompt, choose the default option Start Clonezilla and press the Enter key.

You will now get a screen asking if you wish to work with images or clone from one physical disk to another (duplicate). Choose the device-image option and press the Enter key.

You will now be asked where you are going to save the image to, as FreeNAS runs Samba, we will choose samba_server.

Press the Enter key.

Note: If you are not using FreeNAS, but are instead saving to a Windows or Linux Samba share, then you would still select this option.

You will now be asked to set-up a network IP address for Clonezilla so that it can connect to the network share.

As we have a DHCP server (in my case it is my DSL router) I’m going to select dhcp.

Press the Enter key to continue.

Once Clonezilla has obtained an IP address from the DHCP server, you will be asked for the IP address of the Samba server which contains the file share you wish to connect.

In my case the address is of the FreeNAS server is 192.168.1.252, yours is probably different.

Once you have entered the address, press the Enter key to continue.

You will be asked to provide the domain name, if you don’t have a domain name set you can leave this blank. In my case mine is called workgroup.

Press the Enter key to continue.

You will now be asked for a username to connect to the FreeNAS server, the offered name is Administrator. Replace this with a valid username for your network share. In my case I have a username of fernsm1 set-up on my FreeNAS server.

Press the Enter key.

You will then be asked for the destination directory, and will be offered the directory name of /images. Replace this with the name of your network share and the directory within that share you wish to save the image in to.

In my case this is /NASDisk1/images, remember that Unix and Linux operating systems are case sensitive. So if the share name is in upper case, make sure you write it in upper case!

UPDATE: 15/12/10

You can also enter the share name. So in my example the Samba/ CIFS share name is /DiskImages and you just enter what I’ve put in bold text. You may find this more reliable than specifying the actual path.

When done, press the Enter key.

The following screen will be displayed. This is a summary of what you have entered so far, and warns that you will now be asked to enter the password.

Press the Enter key.

At the bottom of the screen the following will appear.

The above is the command string being used to connect Clonezilla to the share.

Type in your password and press Enter.

If the following will be displayed, this means that Clonezilla has successfully connected to the FreeNAS server/ network share. if you get an error message at this stage, check the share name and/ or username/ password and start again.

Press the Enter key.

You now need to select the mode you wish to run Clonezilla in, a list of choices will be displayed

As we are creating an image of the PC, we will use the savedisk option. Select and press the Enter key.

You will then be asked for a name to give the image. By default Clonezilla gives a unique file name based on the date and time. When you have give a file name for the saved image, press the Enter key to continue.

You will now be asked to select the hard disk on the PC which you wish to clone. If you only have one hard disk, just press the Enter key. Otherwise use the cursor keys and space-bar to select/ deselect a disk..

You will now go through a number of screens offering “advanced extra parameters”. Accept the defaults on all.

Once completed, Clonezilla builds a command string should use wish to use it again without having to go through all the menus. In our case it should look similar to the following

Press the Enter key to continue.

Clonezilla will now start the cloning process, telling you what it is about to do and giving you the option to cancel.

If you are happy with the summary it provided, press y followed by the Enter key to continue.

Clonezilla will check the file system of the source PC to ensure okay and determine the cloning method it will use before it starts to clone the hard disk. If satisfied, it will then commence the cloning process.

Once the disk has been cloned, you will see something like this

Congratulations, you have successfully cloned your PCs hard disk to your FreeNAS network share.

Pressing Enter, will give you an options menu:

  1. Poweroff
  2. Reboot
  3. Enter command line prompt
  4. Start over

Warning: The default is option 2.

 

=-=-=-=-=
Powered by Blogilo

About these ads
  1. HR
    September 5, 2010 at 17:39

    Great tutorial.. just did both my daughters minis (running linux) via PXE boot :) Got any way to pass the mounting and login info through append?

    • September 5, 2010 at 21:15

      I’m currently working on setting up Clonezilla Server, this could be a Virtual server and using FreeNAS server as the image store. This is in fact how I’m configuring it using Virtualbox.

      This has the advantage that the clients can PXE boot off the Clonezilla server and the image is broadcast to multiple PCs but at the same bandwidth as cloning just one PC. Furthermore, you can still use the clonezilla images with the Live Clonezilla boot CD.

  2. Yoseph
    June 7, 2011 at 18:01

    Hi Blogilo,

    Thank you for this post. It really helped me setup my FreeNAS server. However, I am having an issue doing cloning using Clonezilla. I am using FreeNAS 8. I have desktop machines that need to cloned for backup purposes. I was able to come to second to the last image without any problem. So here is how I have come to that point. it started to give me home/parimag/ mount point not found issue. so I turned on CIFS and that let me share folders, created /mnt/Volume-1 sharing under windows section and also I created home/partimag/ manually in windows share section. Now after doing the cloning seem to work fine for the bios partition, but for the rest of the partition it gives me a message CIFS VFS: NO response to cmd mid 2246 and on the subsistent lines I can see it is not writing.

    Any thoughts?
    thanks

  3. Yoseph
    June 13, 2011 at 13:02

    I am sorry for my mistake Mark. I actually installed version 7.2 and that is working fine. I will install version 8 and try it again. But I want to thank you for your suggestion.

    Thanks,
    Yoseph

  4. August 30, 2011 at 20:52

    Free domain name when you sign up more than 12 months, cheap web hosting avaliable for bloggers, managed vps Just USD 35.99/Mo, Start Your own web hosting company today. visit http://www.synwebhost.com to get more details

  5. tica-mos
    September 27, 2011 at 15:54

    Hello. Is it possible to restore the same image, from a nfs or samba share, to multiple boxes at the same time? I have try clonezilla server for this purpose but always have problems because the image is of a dual-boot win/linux box.

  6. October 5, 2011 at 18:08

    would it not be easier to use an offsite backup?

  7. tica-mos
    October 5, 2011 at 18:59

    Do you mean going around with an external drive, restoring one by one? No. I was thinking about doing some 10 copies of the live CD then booting them almost at the same time and they would restore the image from the share almost simultaneously.

  8. Deepak
    April 20, 2012 at 04:58

    i like your post…. :) NIce work…. Can you help to write a script to automate all these steps in a single click….

  9. July 25, 2012 at 11:45

    Magnificent beat ! I wish to apprentice at the same time as you amend your website, how can i subscribe for a blog website? The account aided me a applicable deal. I were tiny bit familiar of this your broadcast provided brilliant clear idea

  10. cc
    November 16, 2012 at 18:46

    Very good intell. Just set up a NAS running Windows Storage Server, & testing it with a MacBook. You’re instructions were right on the spot!

  11. November 21, 2012 at 08:16

    Hi I’m looking at employing freenas and clonezilla in a laptop repair workshop environment, with sysprepped images for the various models stored on the NAS. What transfer speeds do you get over the Wire, we currently manually transfer images over usb2, and it only gets 20meg a second, so hoping gigabit ethernet out to be alot faster

  12. thethane
    January 3, 2013 at 16:18

    i run a clonzilla server with a single wdblack 3tb drive and i get about 5.75 gb/ min transfer rate. Lesser hard drives got about 3.5. Uploading an image is slower since there is compression taking place.

  13. Amac
    February 6, 2013 at 19:12

    Hello my name is Andre, I have a multiple folder present on NAS Qnap. Currently i have a litle menu on usb pen boot. This menu have a five submenu LABEL where i do forward the image for the their folder that i want. But I need a menu more automatic i want a five submenu whit a global variable and when i select a folder where i want to save a image replace in code

    Example
    label STORE # MENU DEFAULT # MENU HIDE MENU LABEL Store # MENU PASSWD kernel /live/vmlinuz append initrd=/live/initrd.img boot=live config noswap nolocales edd=on nomodeset noprompt ocs_prerun=”mount -t cifs -o user=admin,domain=domain.net 172.28.64.141:/Images/%FOLDER% /home/partimag” ocs_live_run=”/opt/drbl/sbin/ocs-sr -u -q2 -c -j2 -z1 -i 2000 -p true savedisk ask_user sda” ocs_live_extra_param=”” ocs_live_keymap=”” ocs_live_batch=”no” ocs_lang=”en_US.UTF-8″ vga=788 toram=filesystem.squashfs nosplash TEXT HELP Store an image to the NAS ENDTEXT

  14. TOROTEK
    October 7, 2014 at 02:25

    Excellent tutorial Thank you!!!

  1. October 18, 2010 at 06:31
  2. January 4, 2011 at 08:23

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 56 other followers

%d bloggers like this: