Use Clonezilla to clone and restore Linux systems

Summary: Use Clonezilla to clone and restore Linux systems

Reborn Dragon Baidu Cloud Download:

Link: https://pan.baidu.com/s/1OT8hi5IXCwGasrZxovyHLQ Password: pt8z

Startup

Enter Clonezilla:

    The Chinese name of Clonezilla will be called "Regenerating Dragon" below. Use a U disk to make a PE disk, when the system starts, boot through the U disk (note that the bios needs to be modified, I am using ubuntu 10.0, press the delete key after booting to enter the bios, find boot->hard...->option1 Modify it to U disk (the name of the U disk will be displayed) to start).

Reborn Dragon loading process:

    The loading process is the same as that of the Linux system, the difference is that the restoration tool is automatically loaded at the end. Below is a partial screenshot of its loading process.

    After the startup is complete, the first thing is to select the interface language. "Simplified Chinese" can be selected.

    Configure the terminal data (literal translation) interface, the default option. Because when the language is selected, the system has automatically configured the keyboard data for the language. The keyboard standards for Chinese and English interfaces are both American standards.

    Here, if you are in contact with Reborn Dragon for the first time, select "Use Reborn Dragon" to continue with the graphical interface. If you are already quite familiar with the commands of the reborn dragon, you can try the command line operation.

    Familiar with the use of Ghost software, I believe the following options are not unfamiliar. Since this time, all partitions of the entire hard disk are to be backed up into an image file for the purpose of restoring the system later, so choose the first option. However, if you want to perform the operation of hard disk copying or partition copying, which does not involve image files, then choose the second item.

Example of cloning method:

    Here in order to enable you to better clone your Linux system, I provide two ways to demonstrate. At this point, you may be a little confused, and you may not know whether you are backing up the system or restoring the system. Then explain more, the choice of the following method is the network method setting that needs to be performed regardless of backup or restore. The setup here will generate multiple branches to determine whether to back up or restore the system. When backing up, you can choose whether to back up the entire hard disk or a specified partition. This section is the most important and most prone to failure of this blog post.

1. ssh_server method

    这里需要搭建SSH服务器。关于如何搭建本文略之。可以参考我的同学300second的“在CentOS 5.5下用OpenSSH构建SSH服务器”一文。

 

    此时要备份的系统所在机器为客户端。其IP获取方式有多种形式供选择,这里我的选择是dhcp选项。

    下面的IP设定的是服务器的,一定要注意。这里填写ssh服务器的IP地址。

    SSH服务器的侦听端口,默认为22。

     SSH服务器系统中的合法账户名称。

    上面的用户有权访问的SSH服务器的目录。Clonezilla有个默认值,不过需要手动建立并修改权限后才可使用。这里我填入的是我的服务器的目录。有两种情况你需要注意。1、如果你是要备份系统的,下面的目录就是你所要备份到的目标SSH服务器的目录;2、如果你是要还原系统,下面的目录就是你的备份存在于服务器上的位置。

    提示信息你下面的操作需要输入“shenzhi”用户的密码来建立访问。

    在输入“yes”后,继续输入密码。如果上述操作均正确(呵呵,如果你第一次操作要特别小心,错了也不要着急,重新来过便是。加油哦!),接下来将有几个询问输入“y”回车。通过SSH方式的克隆方式就完成了。

2、Samba或者NFS方式

     题目中为什么用或者,是因为这两种方式在我的操作中差异不大。这里以Samba为例演示,有兴趣的话可以看下NFS方式是否真的如我所说与Samba是几乎一样的。

    这里有一个前提条件,和SSH一样需要建立一个Samba服务器。不过由于Samba是Linux下的东东,使用同windows系统“文件共享”相同的协议。所以在某一windows系统共享一个文件夹如下图所示。然后,禁用Guest用户,并给administrator设置登录密码。这样服务器就搞定了。NFS也是这么搞的。有点不专业,不过实现至上嘛。

 

     选择获得IP的方式。

     

     填写服务器的IP地址。

     此处一般不填。

    填写服务器的合法登录账号。一般用administrator就可以了,不过一定要设置用户的密码。

    下面要输入的xp系统中共享文件夹的名称。

    提示界面,回车继续。

    在此处要输入windows系统中administrator用户的密码。

    会有一个关于分区的挂载信息,注意观察最后一行,可以看到

备份篇

    在选择了备份/恢复系统方式会再次出现一次,用户可以选择通过默认设置还是自行选择高级参数来进行备份操作。这里我们选择“初学模式”。

    要注意的是,现在由于是第一次备份系统,所以在服务器中并未存有任何的备份文件。这种情况下看到的是如下界面,这时可以选择备份整个硬盘,或者备份指定分区。这里选择第一项(你可以根据你的需要来进行选择)。

    所保存的镜像文件默认的名称是以此时系统的时间构成的,也可以自行对其进行修改。

    如果机器上有多个硬盘,此时可以选择要备份的硬盘,此时只有一个,所以不用选择,直接回车继续。

    下面的功能在我所用的以前版本的Clonzilla中未曾见到,对于分区出现问题的朋友是个福音哦。不过硬盘分区故障概率并不高,选择第一个选项就可以了。

    下面这个选项,默认选中的第一项,可以保证所保存的镜像文件的完整性,不过我没有尝试(有点保守)。

    一个不错的提示信息,可以告诉你,上述的关于备份的选择可以通过下面的命令来一次性完成,在此再一次见证了命令行的强大与便捷。

    回车后备份就开始了。

还原篇

    备份系统的目的就是为了有一天可以用来还原系统,备份与还原操作是对称存在的。有一个前提:在还原系统前一定要确定对应的目录中有备份文件的存在,以及所备份的是整个硬盘或是哪个分区,以防出错

    还原系统时,首先要进行的依然是克隆方式的选择,可参见本博文中的“克隆方式示例”。然后才进入如下界面。

    与上相同,不复赘述。

    下面有很多的模式供选择,既有备份选项,也有还原选项。为什么在备份系统时没有呢?本人经实验后得出,由于在进行上上述备份操作之时,对应的服务器目录中并未有任何的备份文件,再生龙判断后断定必是备份系统的操作。现在的情境是对应的目录中已经存在备份文件,再生龙不知道用户是要进行备份,还是还原的操作。不知你是否明白,不过没有关系,如果还原硬盘选择第三个选项便是。

    由于是承接上述备份的实验,此时只有一个备份文件,就不用进行选择了。

    选择要被恢复到的硬盘。

    还原系统的操作同样可以通过命令行来完成。

    最后为了防止误操作的发生,系统提出了警告信息。如果确认无误,输入“y”回车继续。

    接下来还会有一个警告,然后还原操作就开始了。至此,所有的操作就完成了,这只是一个初步完整的演示,其实再生龙最为强大的功能是其具备极多文件系统的备份支持、灵活的备份方式支持、强大的命令行备份定制支持。

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325609491&siteId=291194637