官方链接:

http://www.clonezilla.org/
http://www.clonezilla.org/downloads.php
参考文档:
http://www.debian-administration.org/article/478/Setting_up_a_server_for_PXE_network_bootinghttp://drbl.sourceforge.net
http://clonezilla.nchc.org.tw/clonezilla-live/livepxe.php
http://clonezilla.nchc.org.tw/clonezilla-live/doc/fine-print.php?path=./99_Misc/00_live-initramfs-manual.doc#00_live-initramfs-manual.doc
以clonezilla-live-20140915-trusty-amd64.iso为例:
一. 简介:
What is Clonezilla?
Clonezilla is a partition and disk imaging/cloning program similar to True Image® or Norton Ghost®. It helps you to do system deployment, bare metal backup and recovery. Two types of Clonezilla are available, Clonezilla live and Clonezilla SE (server edition). Clonezilla live is suitable for single machine backup and restore. While Clonezilla SE is for massive deployment, it can clone many (40 plus!) computers simultaneously. Clonezilla saves and restores only used blocks in the harddisk. This increases the clone efficiency. With some high-end hardware in a 42-node cluster, a multicast restoring at rate 8 GB/min was reported.Features:
- Free (GPL) Software.
- Filesystem supported: (1) ext2, ext3, ext4, reiserfs, reiser4, xfs, jfs, btrfs of GNU/Linux, (2) FAT12, FAT16, FAT32, NTFS of MS Windows, (3) HFS+ of Mac OS, (4) UFS of FreeBSD, NetBSD, and OpenBSD, (5) minix of Minix, and (6) VMFS3 and VMFS5 of VMWare ESX. Therefore you can clone GNU/Linux, MS windows, Intel-based Mac OS, FreeBSD, NetBSD, OpenBSD, Minix and VMWare ESX, no matter it's 32-bit (x86) or 64-bit (x86-64) OS. For these file systems, only used blocks in partition are saved and restored. For unsupported file system, sector-to-sector copy is done by dd in Clonezilla.
- LVM2 (LVM version 1 is not) under GNU/Linux is supported.
- Boot loader, including grub (version 1 and version 2) and syslinux, could be reinstalled.
- Both MBR and GPT partition format of hard drive are supported. Clonezilla live also can be booted on a BIOS or uEFI machine.
- Unattended mode is supported. Almost all steps can be done via commands and options. You can also use a lot of boot parameters to customize your own imaging and cloning.
- One image restoring to multiple local devices is supported.
- Multicast is supported in Clonezilla SE, which is suitable for massively clone. You can also remotely use it to save or restore a bunch of computers if PXE and Wake-on-LAN are supported in your clients.
- The image file can be on local disk, ssh server, samba server, or NFS server.
- Based on Partclone (default), Partimage (optional), ntfsclone (optional), or dd to image or clone a partition. However, Clonezilla, containing some other programs, can save and restore not only partitions, but also a whole disk.
- By using another free software drbl-winroll, which is also developed by us, the hostname, group, and SID of cloned MS windows machine can be automatically changed.
Minimum System Requirements for Clonezilla live:
- X86 or x86-64 processor
- 196 MB of system memory (RAM)
- Boot device, e.g. CD/DVD Drive, USB port, PXE, or hard drive
Limitations:
- The destination partition must be equal or larger than the source one.
- Differential/incremental backup is not implemented yet.
- Online imaging/cloning is not implemented yet. The partition to be imaged or cloned has to be unmounted.
- Software RAID/fake RAID/firmware RAID is not supported by default. It can be done manually only.
- Due to the image format limitation, the image can not be explored or mounted. You can _NOT_ recovery single file from the image. However, you still have workaround to make it, read this.
- Recovery Clonezilla live with multiple CDs or DVDs is not implemented yet. Now all the files have to be in one CD or DVD if you choose to create the recovery iso file.
License:
- Clonezilla itself is licensed under the GNU General Public License (GPL) Version 2. However, to run Clonezilla, a lot of free and open source software, e.g. the Linux kernel, a mininal GNU/Linux OS, are required.
二. 搭建PXE环境:
gparted live cd是基于debian-live,所以,syslinux参数和红帽的有些区别,具体的可以参看文章开头的参考文档。
有兴趣的朋友可以参考在下的拙篇,这里就不再细述,欢迎大家批评指正
CenOS6 nginx+pxe+tftpd+samba/nfs+dhcpd 无盘安装windows & linux
Ubuntu12.04 nginx+pxe+tftpd+samba/nfs+dhcpd 无盘安装windows & linux
三.
定义clonezilla pxe菜单:
mount -o loop
/mnt/ISO/linux/clonezilla-live-20140915-trusty-amd64.iso
/mnt/iso/
mkdir /var/lib/tftpboot/clonezilla
cp -av /mnt/iso/live /var/lib/tftpboot/clonezilla
cp -av /mnt/iso/live/filesystem.squashfs
/var/www/pub/ftp/clonezilla
cp -av /mnt/iso/syslinux/syslinux.cfg /var/lib/tftpboot/clonezilla/default
以下是我个人的clonezilla pxe菜单/var/lib/tftpboot/clonezilla/default,把iso中的syslinux.cfg另存为default再加以修改即可,仅供参考。
注:这里最重要的就是filesystem.squashfs这个文件,fetch支持tftp,ftp,http这几种模式,我这里选用的是http模式,所以看的到是fetch=http://192.168.8.254/ftp/clonezilla/filesystem.squashfs
default /clonezilla/vesamenu.c32
#prompt 1
timeout 600
display /clonezilla/boot.cat
menu background /clonezilla/ocswp.png
menu title Clonezilla Live(Linux trusty 3.13.0-35-generic)
menu color border 0 #ffffffff #00000000
menu color sel 7 #ffffffff #ff000000
menu color title 0 #ffffffff #00000000
menu color tabmsg 0 #ffffffff #00000000
menu color unsel 0 #ffffffff #00000000
menu color hotsel 0 #ff000000 #ffffffff
menu color hotkey 7 #ffffffff #ff000000
menu color scrollbar 0 #ffffffff #00000000
# MENU MASTER PASSWD
say **********************************************************************
say Clonezilla, the OpenSource Clone System.
say NCHC Free Software Labs, Taiwan.
say clonezilla.org, clonezilla.nchc.org.tw
say THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
say **********************************************************************
# Allow client to edit the parameters
ALLOWOPTIONS 1
# simple menu title
MENU TITLE clonezilla.org, clonezilla.nchc.org.tw
# Since no network setting in the squashfs image, therefore if ip=, the network is disabled. That's what we want.
label Clonezilla live (To RAM)
MENU BEGIN Other modes of Clonezilla live
label Clonezilla live
label Clonezilla live 1024x768
label Clonezilla live 640x480
label Clonezilla live KMS
label Clonezilla live without framebuffer
label Clonezilla live failsafe mode
MENU END
label local
MENU BEGIN Memtest & FreeDOS
# Note! *.bin is specially purpose for syslinux,
# Do NOT use memtest.bin, use memtest instead of memtest.bin
label memtest
label FreeDOS
MENU END
label iPXE
MENU END
四. 效果图:




语言可以自由选择。




通过进入shell命令行,我们可以看到,lonezilla-live-20140915-trusty-amd64.iso这个版本是基于Ubuntu14.04.1 LTS,内核也是比较新的3.13.0内核。
示例:
将本地某分区备份到远程smb主机




这里填smb主机的地址

smb主机的domain,可以为空

合法的smb用户

smb主机目录,存放备份之用。



输入smb用户的密码。




备份的文件名。