UCloner (原名 Ubuntu-cloner ) 是针对 Ubuntu编写的一个系统备份、恢复、克隆工具,使用UCloner可以将 ubuntu 系统备份为 squashfs 映像文件,也可从映像文件中恢复系统。具体方法如下:
备份:
UCloner 备份时可以使用图形界面或命令行,这里介绍图形界面,下载UCloner后解压,双击UCloner_CN文件,要求管理员密码。
《图片》
备份前用清理工具先清理缓存和无效的配置文件,备份时软件会首先剔除一些常用的挂载点文件夹,还可以手动增加需要排除的文件夹,建议将常用的比如说存放电影,文档的文件夹排除,(或者将这些文件夹单独存放到移动硬盘里进行备份)这里由软件自动选取的文件或文件夹是不可以取消的。比如说我手动排除了用户文件夹里的软件,文档等文件夹,但是没有排除各种软件的配置文件夹(就是文件夹名前有“.”的,在用户文件夹里按Ctrl+h就可以看到),这样恢复时软件设置仍然不变,而文档存到移动硬盘里备份使用时也更方便些。
全部选定后可以用“估算体积”功能先估算squashfs文件大小,点击开始备份,我遇到的一个问题是squashfs文件体积会膨胀,目前不知原因,我估算体积位23.3G但实际备份达到了54.5G,大概半个小时时间,看个人的情况。
恢复:
使用UCloner必须要将备份文件放到另一块硬盘里,一般使用移动硬盘,然后是一个Live CD或usb启动盘,最好是与源系统同版本的,比如ubuntu10.04.2 64位版,否则根据软件说明的会出现不可知问题。将UCloner放到U盘中,由u盘启动,使用图形界面,各种参数介绍非常详细。
ubuntu@ubuntu:~/Desktop/UCloner-10.10.1/program$ sudo ./ucloner_cmd.py mode=restore lang=cn restore_from=/media/移动硬盘/备份文件夹/2011-04-07_部分备份2.squashfs /=/dev/sda2 /_fs=ext4 /home=/dev/sda6 /home_fs=current /boot=/dev/sda1 /boot_fs=ext4 /usr=/dev/sda5 /usr_fs=ext4 grubdev=/dev/sda swap=/dev/sda7
/tmp/UCloner-source has been made.
/media/移动硬盘/备份文件夹/2011-04-07_部分备份2.squashfs has been mounted to /tmp/UCloner-source.
/dev/sda2 will be formated as ext4 (All data in it will be destroyed!) and mounted to /
/dev/sda1 will be formated as ext4 (All data in it will be destroyed!) and mounted to /boot
/dev/sda6 will use current filesystem, and be mounted to /home
/dev/sda5 will be formated as ext4 (All data in it will be destroyed!) and mounted to /usr
/dev/sda7 will be used as swap (All data in it will be destroyed!)
Grub2 will be installed to /dev/sda
continue ? (y|n)
**********
```````
```````
```````
var/lib/gconf/defaults/%gconf-tree-mk.xml
var/lib/gconf/defaults/%gconf-tree-ml.xml
var/lib/gconf/defaults/%gconf-tree-mr.xml
var/lib/gconf/defaults/%gconf-tree-nb.xml
var/lib/gconf/defaults/%gconf-tree-nl.xml
var/lib/gconf/defaults/%gconf-tree-nn.xml
var/lib/gconf/defaults/%gconf-tree-oc.xml
var/lib/gconf/defaults/%gconf-tree-or.xml
var/lib/gconf/defaults/%gconf-tree-pa.xml
var/lib/gconf/defaults/%gconf-tree-pl.xml
var/lib/gconf/defaults/%gconf-tree-pt.xml
var/lib/gconf/defaults/%gconf-tree-pt_BR.xml
var/lib/gconf/defaults/%gconf-tree-ro.xml
var/lib/gconf/defaults/%gconf-tree-ru.xml
var/lib/gconf/defaults/%gconf-tree-sk.xml
var/lib/gconf/defaults/%gconf-tree-sl.xml
var/lib/gconf/defaults/%gconf-tree-sq.xml
var/lib/gconf/defaults/%gconf-tree-sr.xml
var/lib/gconf/defaults/%gconf-tree-sr@latin.xml
var/lib/gconf/defaults/%gconf-tree-sv.xml
var/lib/gconf/defaults/%gconf-tree-ta.xml
var/lib/gconf/defaults/%gconf-tree-te.xml
var/lib/gconf/defaults/%gconf-tree-th.xml
var/lib/gconf/defaults/%gconf-tree-tl.xml
var/lib/gconf/defaults/%gconf-tree-tr.xml
var/lib/gconf/defaults/%gconf-tree-uk.xml
var/lib/gconf/defaults/%gconf-tree-vi.xml
var/lib/gconf/defaults/%gconf-tree-zh_CN.xml
var/lib/gconf/defaults/%gconf-tree-zh_HK.xml
var/lib/gconf/defaults/%gconf-tree-zh_TW.xml
var/lib/gconf/defaults/%gconf-tree.xml
var/lib/gdm/
var/lib/gdm/.ICEauthority
var/lib/gdm/.esd_auth
var/lib/gdm/.gconf.path
var/lib/gdm/.pulse-cookie
var/lib/gdm/.cache/
var/lib/gdm/.cache/event-sound-cache.tdb.455e81b9f7a6c6fc5119f3784d917cce.x86_64-pc-linux-gnu
var/lib/gdm/.cache/login_frequency.cache
var/lib/gdm/.config/
var/lib/gdm/.config/ibus/
var/lib/gdm/.config/ibus/bus/
var/lib/gdm/.dbus/
var/lib/gdm/.dbus/session-bus/
var/lib/gdm/.dbus/session-bus/455e81b9f7a6c6fc5119f3784d917cce-0
var/lib/gdm/.gconf.defaults/
var/lib/gdm/.gconf.defaults/%gconf-tree.xml
var/lib/gdm/.gconf.mandatory/
var/lib/gdm/.gconf.mandatory/%gconf-tree.xml
var/lib/gdm/.gconf/
var/lib/gdm/.gconf/apps/
var/lib/gdm/.gconf/apps/%gconf.xml
var/lib/gdm/.gconf/apps/gdm/
var/lib/gdm/.gconf/apps/gdm/%gconf.xml
var/lib/gdm/.gconf/apps/gdm/simple-greeter/
var/lib/gdm/.gconf/apps/gdm/simple-greeter/%gconf.xml
var/lib/gdm/.gconfd/
var/lib/gdm/.gconfd/saved_state
var/lib/gdm/.pulse/
var/lib/gdm/.pulse/455e81b9f7a6c6fc5119f3784d917cce-card-database.tdb
var/lib/gdm/.pulse/455e81b9f7a6c6fc5119f3784d917cce-default-sink
var/lib/gdm/.pulse/455e81b9f7a6c6fc5119f3784d917cce-default-source
var/lib/gdm/.pulse/455e81b9f7a6c6fc5119f3784d917cce-device-volumes.tdb
var/lib/gdm/.pulse/455e81b9f7a6c6fc5119f3784d917cce-runtime -> /tmp/pulse-PKdhtXMmr18n
var/lib/gdm/.pulse/455e81b9f7a6c6fc5119f3784d917cce-stream-volumes.tdb
var/lib/hal/
var/lib/hp/
var/lib/hp/hplip.state
var/lib/initramfs-tools/
var/lib/initramfs-tools/2.6.32-30-generic
var/lib/initscripts/
var/lib/insserv/
var/lib/libreoffice/
var/lib/libreoffice/basis3.3/
var/lib/libreoffice/basis3.3/program/
var/lib/libreoffice/basis3.3/program/services.rdb
var/lib/libreoffice/basis3.3/share/
var/lib/libreoffice/basis3.3/share/config/
var/lib/libreoffice/basis3.3/share/config/Javasettingsunopkginstall.xml
var/lib/libreoffice/share/
var/lib/libreoffice/share/prereg/
var/lib/libreoffice/share/prereg/bundled/
var/lib/libuuid/
var/lib/libxml-sax-perl/
var/lib/libxml-sax-perl/ParserDetails.d/
var/lib/libxml-sax-perl/ParserDetails.d/10-XML::SAX::PurePerl
var/lib/libxml-sax-perl/ParserDetails.d/50-XML::LibXML::SAX
var/lib/libxml-sax-perl/ParserDetails.d/50-XML::LibXML::SAX::Parser
var/lib/libxml-sax-perl/ParserDetails.d/50-XML::SAX::Expat
var/lib/locales/
var/lib/locales/supported.d/
var/lib/locales/supported.d/en
var/lib/locales/supported.d/local
var/lib/locales/supported.d/zh-hans
var/lib/logrotate/
var/lib/logrotate/status
var/lib/misc/
var/lib/misc/dnsmasq.leases
var/lib/misc/usb.ids -> ../usbutils/usb.ids
var/lib/mlocate/
var/lib/mlocate/mlocate.db
var/lib/mplayer/
var/lib/mplayer/prefs/
var/lib/mplayer/prefs/MD5SUMS
var/lib/mplayer/prefs/codecs_list
var/lib/mplayer/prefs/mirrors
var/lib/msttcorefonts/
var/lib/msttcorefonts/cabfiles.sha256sums
var/lib/msttcorefonts/ms-fonts
var/lib/ntpdate/
var/lib/ocaml/
var/lib/ocaml/lintian/
var/lib/ocaml/lintian/camlp4.info
var/lib/ocaml/lintian/ocaml-nox.info
var/lib/ocaml/lintian/ocaml.info
var/lib/ocaml/md5sums/
var/lib/ocaml/md5sums/camlp4.md5sums
var/lib/ocaml/md5sums/ocaml-nox.md5sums
var/lib/ocaml/md5sums/ocaml.md5sums
var/lib/os-prober/
var/lib/pam/
var/lib/pam/account
var/lib/pam/auth
var/lib/pam/password
var/lib/pam/seen
var/lib/pam/session
var/lib/pam/session-noninteractive
var/lib/plymouth/
var/lib/plymouth/boot-duration
var/lib/polkit-1/
var/lib/polkit-1/localauthority/
var/lib/polkit-1/localauthority/10-vendor.d/
var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla
var/lib/polkit-1/localauthority/20-org.d/
var/lib/polkit-1/localauthority/30-site.d/
var/lib/polkit-1/localauthority/50-local.d/
var/lib/polkit-1/localauthority/90-mandatory.d/
var/lib/pulseaudio/
var/lib/pycentral/
var/lib/pycentral/pkgremove
var/lib/samba/
var/lib/security/
var/lib/security/classpath.security
var/lib/sgml-base/
var/lib/snmp/
var/lib/synaptic/
var/lib/ubiquity/
var/lib/ubiquity/os-prober-cache
var/lib/ucf/
var/lib/ucf/hashfile
var/lib/ucf/hashfile.0
var/lib/ucf/hashfile.1
var/lib/ucf/hashfile.2
var/lib/ucf/hashfile.3
var/lib/ucf/hashfile.4
var/lib/ucf/hashfile.5
var/lib/ucf/hashfile.6
var/lib/ucf/hashfile.7
var/lib/ucf/registry
var/lib/ucf/registry.0
var/lib/ucf/registry.1
var/lib/ucf/registry.2
var/lib/ucf/registry.3
var/lib/ucf/cache/
var/lib/ucf/cache/:etc:default:grub
var/lib/ucf/cache/:etc:foomatic:filter.conf
var/lib/ucf/cache/:etc:gconf:2:path
var/lib/ucf/cache/:etc:gns3:gns3.ini
var/lib/ucf/cache/:etc:papersize
var/lib/ucf/cache/:etc:perl:XML:SAX:ParserDetails.ini
var/lib/ucf/cache/:etc:rsyslog.d:50-default.conf
var/lib/ucf/cache/:etc:samba:smb.conf
var/lib/ucf/cache/:etc:ufw:after.rules
var/lib/ucf/cache/:etc:ufw:after6.rules
var/lib/ucf/cache/:etc:ufw:before.rules
var/lib/ucf/cache/:etc:ufw:before6.rules
var/lib/udisks/
var/lib/udisks/mtab
var/lib/update-manager/
var/lib/update-notifier/
var/lib/update-notifier/dpkg-run-stamp
var/lib/update-notifier/user.d/
var/lib/update-rc.d/
var/lib/update-rc.d/NetworkManager
var/lib/update-rc.d/acpi-support
var/lib/update-rc.d/acpid
var/lib/update-rc.d/anacron
var/lib/update-rc.d/apparmor
var/lib/update-rc.d/apport
var/lib/update-rc.d/atd
var/lib/update-rc.d/avahi-daemon
var/lib/update-rc.d/binfmt-support
var/lib/update-rc.d/bluetooth
var/lib/update-rc.d/brltty
var/lib/update-rc.d/casper
var/lib/update-rc.d/console-screen.kbd.sh
var/lib/update-rc.d/console-setup
var/lib/update-rc.d/consolekit
var/lib/update-rc.d/cron
var/lib/update-rc.d/cryptdisks
var/lib/update-rc.d/cryptdisks-early
var/lib/update-rc.d/cups
var/lib/update-rc.d/cupsys
var/lib/update-rc.d/dbus
var/lib/update-rc.d/devpts.sh
var/lib/update-rc.d/dns-clean
var/lib/update-rc.d/fancontrol
var/lib/update-rc.d/fuse-utils
var/lib/update-rc.d/gdm
var/lib/update-rc.d/grub-common
var/lib/update-rc.d/halt
var/lib/update-rc.d/hdparm
var/lib/update-rc.d/hostname.sh
var/lib/update-rc.d/hplip
var/lib/update-rc.d/hwclock
var/lib/update-rc.d/hwclock.sh
var/lib/update-rc.d/hwclockfirst.sh
var/lib/update-rc.d/kerneloops
var/lib/update-rc.d/keyboard-setup
var/lib/update-rc.d/killprocs
var/lib/update-rc.d/lm-sensors
var/lib/update-rc.d/makedev
var/lib/update-rc.d/module-init-tools
var/lib/update-rc.d/mountkernfs
var/lib/update-rc.d/mountoverflowtmp
var/lib/update-rc.d/mountvirtfs
var/lib/update-rc.d/mtab.sh
var/lib/update-rc.d/networking
var/lib/update-rc.d/ondemand
var/lib/update-rc.d/open-vm-tools
var/lib/update-rc.d/pcmciautils
var/lib/update-rc.d/ppp
var/lib/update-rc.d/pppd-dns
var/lib/update-rc.d/procps
var/lib/update-rc.d/pulseaudio
var/lib/update-rc.d/rc.local
var/lib/update-rc.d/reboot
var/lib/update-rc.d/rsync
var/lib/update-rc.d/rsyslog
var/lib/update-rc.d/saned
var/lib/update-rc.d/screen-cleanup
var/lib/update-rc.d/sendsigs
var/lib/update-rc.d/single
var/lib/update-rc.d/speech-dispatcher
var/lib/update-rc.d/sudo
var/lib/update-rc.d/ubiquity
var/lib/update-rc.d/udev
var/lib/update-rc.d/udev-finish
var/lib/update-rc.d/ufw
var/lib/update-rc.d/umountfs
var/lib/update-rc.d/umountnfs.sh
var/lib/update-rc.d/umountroot
var/lib/update-rc.d/unattended-upgrades
var/lib/update-rc.d/urandom
var/lib/update-rc.d/vboxdrv
var/lib/update-rc.d/vboxnet
var/lib/update-rc.d/vboxweb-service
var/lib/update-rc.d/virtualbox-ose
var/lib/update-rc.d/wpa-ifupdown
var/lib/update-rc.d/x11-common
var/lib/upower/
var/lib/urandom/
var/lib/urandom/random-seed
var/lib/ureadahead/
var/lib/ureadahead/boot.pack
var/lib/ureadahead/home.pack
var/lib/ureadahead/pack
var/lib/ureadahead/usr.pack
var/lib/ureadahead/debugfs/
var/lib/usbutils/
var/lib/usbutils/usb.ids
var/lib/vim/
var/lib/vim/addons/
var/lib/x11/
var/lib/x11/Xwrapper.config.md5sum
var/lib/x11/Xwrapper.config.roster
var/lib/xfonts/
var/lib/xfonts/excluded-aliases
var/lib/xkb/
var/lib/xkb/server-9A3F5C924492B13B18AAD4BAD15DCA293428CADD.xkm
var/lib/xkb/server-B20D7FC79C7F597315E3E501AEF10E0D866E8E92.xkm
var/lib/xkb/server-D378AD8F86E560F712A83EE36E4E5E92C595B9BD.xkm
var/lib/xkb/server-F8D9B4EE1D9075AF4B1C23C75362EE93E14954A0.xkm
var/lib/xml-core/
var/lib/xml-core/catalog
var/lib/xml-core/docbook-xml
var/lib/xml-core/rarian-compat
var/lib/xml-core/sgml-data
var/lib/xml-core/xml-core
var/local/
var/lock/
var/log/
var/log/Xorg.0.log
var/log/Xorg.0.log.old
var/log/auth.log
var/log/auth.log.1
var/log/boot
var/log/boot.log
var/log/bootstrap.log
var/log/btmp
var/log/btmp.1.gz
var/log/daemon.log
var/log/daemon.log.1
var/log/debug
var/log/debug.1
var/log/dmesg
var/log/dmesg.0
var/log/dmesg.1.gz
var/log/dmesg.2.gz
var/log/dmesg.3.gz
var/log/dmesg.4.gz
var/log/dpkg.log
var/log/dpkg.log.1
var/log/faillog
var/log/fontconfig.log
var/log/jockey.log
var/log/jockey.log.1
var/log/kern.log
var/log/kern.log.1
var/log/lastlog
var/log/lpr.log
var/log/mail.err
var/log/mail.info
var/log/mail.log
var/log/mail.warn
var/log/messages
var/log/messages.1
var/log/pm-powersave.log
var/log/pm-powersave.log.1
var/log/pycentral.log
var/log/syslog
var/log/syslog.1
var/log/syslog.2.gz
var/log/syslog.3.gz
var/log/syslog.4.gz
var/log/syslog.5.gz
var/log/syslog.6.gz
var/log/syslog.7.gz
var/log/udev
var/log/ufw.log
var/log/user.log
var/log/user.log.1
var/log/vbox-install.log
var/log/wtmp
var/log/wtmp.1.gz
var/log/ConsoleKit/
var/log/ConsoleKit/history
var/log/ConsoleKit/history.1
var/log/apparmor/
var/log/apt/
var/log/apt/history.log
var/log/apt/history.log.1.gz
var/log/apt/term.log
var/log/apt/term.log.1.gz
var/log/cups/
var/log/cups/access_log
var/log/cups/access_log.1.gz
var/log/cups/error_log
var/log/cups/error_log.1.gz
var/log/cups/error_log.2.gz
var/log/cups/error_log.3.gz
var/log/cups/error_log.4.gz
var/log/cups/error_log.5.gz
var/log/cups/error_log.6.gz
var/log/cups/error_log.7.gz
var/log/dist-upgrade/
var/log/fsck/
var/log/fsck/checkfs
var/log/fsck/checkroot
var/log/gdm/
var/log/gdm/:0-greeter.log
var/log/gdm/:0-slave.log
var/log/gdm/:0-slave.log.1
var/log/gdm/:0-slave.log.2
var/log/gdm/:0-slave.log.3
var/log/gdm/:0-slave.log.4
var/log/gdm/:0.log
var/log/gdm/:0.log.1
var/log/gdm/:0.log.2
var/log/gdm/:0.log.3
var/log/gdm/:0.log.4
var/log/installer/
var/log/installer/casper.log
var/log/installer/debug
var/log/installer/initial-status.gz
var/log/installer/media-info
var/log/installer/partman
var/log/installer/syslog
var/log/installer/version
var/log/news/
var/log/news/news.crit
var/log/news/news.err
var/log/news/news.notice
var/log/samba/
var/log/speech-dispatcher/
var/log/unattended-upgrades/
var/mail/
var/opt/
var/run/
var/run/NetworkManager.pid
var/run/acpid.pid
var/run/acpid.socket
var/run/atd.pid
var/run/console-kit-daemon.pid
var/run/crond.pid
var/run/crond.reboot
var/run/gdm.pid
var/run/network-interface-security
var/run/pppd2.tdb
var/run/rsyslogd.pid
var/run/synaptic.socket
var/run/upstart-udev-bridge.pid
var/run/utmp
var/run/ConsoleKit/
var/run/ConsoleKit/database
var/run/avahi-daemon/
var/run/avahi-daemon/pid
var/run/avahi-daemon/socket
var/run/console/
var/run/console/saker
var/run/cups/
var/run/cups/cups.sock
var/run/cups/cupsd.pid
var/run/cups/printcap
var/run/cups/certs/
var/run/cups/certs/0
var/run/dbus/
var/run/dbus/pid
var/run/dbus/system_bus_socket
var/run/gdm/
var/run/gdm/firstserver.stamp
var/run/gdm/auth-for-gdm-OOXrza/
var/run/gdm/auth-for-gdm-OOXrza/database
var/run/gdm/auth-for-saker-Fa84dC/
var/run/gdm/auth-for-saker-Fa84dC/database
var/run/network/
var/run/network/ifstate
var/run/pm-utils/
var/run/pm-utils/locks/
var/run/pm-utils/pm-powersave/
var/run/pm-utils/pm-powersave/storage/
var/run/pppconfig/
var/run/screen/
var/run/sendsigs.omit.d/
var/run/sudo/
var/run/sudo/saker/
var/run/sudo/saker/unknown
var/spool/
var/spool/mail -> ../mail
var/spool/anacron/
var/spool/anacron/cron.daily
var/spool/anacron/cron.monthly
var/spool/anacron/cron.weekly
var/spool/cron/
var/spool/cron/atjobs/
var/spool/cron/atjobs/.SEQ
var/spool/cron/atspool/
var/spool/cron/crontabs/
var/spool/cups/
var/spool/cups/tmp/
var/spool/cups/tmp/.hplip/
var/spool/cups/tmp/.hplip/hplip.conf
var/spool/libreoffice/
var/spool/libreoffice/uno_packages/
var/spool/libreoffice/uno_packages/cache/
var/spool/plymouth/
var/tmp/
sent 8524755020 bytes received 2328270 bytes 32117074.54 bytes/sec
total size is 65486544611 speedup is 7.68