It indicates that I am using the Ubuntu8.10 server and the IP address is 192.168.0.100. As a SystemImager server and a Ubuntu8.10 System (either a server or a desktop system depends on what you want to back up ), the IP address is 192.168.0.101 "). This ip address can be statically specified or assigned through DHCP. When I create an image, I will use ip address switching technology, which means that if the client has a static ip address
Description
I am using the Ubuntu 8.10 server and the IP address is 192.168.0.100. As a SystemImager server, and a Ubuntu 8.10 System (either a server or a desktop system depends on what you want to back up ), the IP address is 192.168.0.101 "). This ip address can be statically specified or assigned through DHCP. When I create an image, I will use ip address switching technology, which means that if the client has a static ip address, When you restore the image, the restored system will have identical IP addresses. If the client obtains an IP address through DHCP, the restored System will obtain another IP address from DHCP, so that the restored IP address may be different.
In the entire tutorial, assume that you have logged on to these two systems as the root user, and enter:
Sudo su
I will use the latest stable version SystemImager (4.0.2 when writing this article). It cannot be obtained from the Ubuntu 8.10 upgrade Library (the version in the 8.10 upgrade library is 3.2.3, when using this version, I cannot start from the startup media when I try to restore the system ).
Remember, SystemImager uses rsync, which means that anyone can access your image on the server during system recovery, unless you restrict certain IP addresses in rsyncd configuration. Therefore, when you perform system backup and recovery on the Internet, you should be careful (or use rsync through SSH tunnel, but this is not part of the scope of this tutorial ), but it should be good for local networks.
Install SystemImager on the backup storage
Server:
On the backup storage, you can install SystemImager as follows:
Apt-get install syslinux libappconfig-perl mkisofs binutilswget http://heanet.dl.sourceforge.net/sourceforge/systemimager/systemimager-boot-i386-standard_4.0.2_all.debwget http://heanet.dl.sourceforge.net/sourceforge/systemimager/systemimager-common_4.0.2_all.debwget http://heanet.dl.sourceforge.net/sourceforge/systemimager/systemimager-initrd-template-i386_4.0.2_all.debwget http://heanet.dl.sourceforge.net/sourceforge/systemimager/systemimager-server_4.0.2_all.debwget http://heanet.dl.sourceforge.net/sourceforge/systemconfig/systemconfigurator_2.2.11-1_all.debdpkg-I systemimager-* systemconfigurator_2.2.11-1_all.deb
Install SystemImager on the gold Client
Client:
On the golden client, you can install SystemImager as follows:
Apt-get install libappconfig-perlwget http://heanet.dl.sourceforge.net/sourceforge/systemimager/systemimager-client_4.0.2_all.debwget http://heanet.dl.sourceforge.net/sourceforge/systemimager/systemimager-common_4.0.2_all.debwget http://heanet.dl.sourceforge.net/sourceforge/systemimager/systemimager-initrd-template-i386_4.0.2_all.debwget http://heanet.dl.sourceforge.net/sourceforge/systemconfig/systemconfigurator_2.2.11-1_all.debdpkg-I systemimager-* systemconfigurator_2.2.11-1_all.deb
Before creating an image, you should check the/etc/fstab to replace all relatime events with the preset values. If you do not do this, the restoration process may fail because you do not know the relatime option when starting the image kernel.
Vi/etc/fstab
My original fstab looks like this:
#/Etc/fstab: static file system information.
#
#
Proc/proc defaults 0 0
#/Dev/sda1
UUID = 70d7425c-82d3-4bfa-8faa-554b1aae8935/ext3 relatime, errors = remount-ro 0 1
#/Dev/sda5
UUID = 6d6205a6-c5dc-4790-a3c0-9823879c3484 none swap sw 0 0
/Dev/cd0/media/cdrom0 udf, iso9660 user, noauto, exec, utf8 0 0
As you can see in row 6th, there is a relatime. Therefore, I modify it as follows:
#/Etc/fstab: static file system information.
#
#
Proc/proc defaults 0 0
#/Dev/sda1
UUID = 70d7425c-82d3-4bfa-8faa-554b1aae8935/ext3 defaults, errors = remount-ro 0 1
#/Dev/sda5
UUID = 6d6205a6-c5dc-4790-a3c0-9823879c3484 none swap sw 0 0
/Dev/cd0/media/cdrom0 udf, iso9660 user, noauto, exec, utf8 0 0
After the image is created, you can change it back to its original state, but you must replace relatime again no matter when the image server updates the image.
Create a gold client image on the backup storage.
Client:
To push the image of the Golden client to the backup storage, you should disable all firewalls of the Golden client, or at least allow connections to tcp port 873 (used by rsync ). Now, on the gold client, run the following command:
Si_prepareclient -- server 192.168.0.100
Server:
On the backup storage, run:
Si_getimage-golden-client 192.168.0.101-image my_golden_client-ip-assignment replicant
Here, the name of my_golden_client is the name of the image to be created. -Ip-assignment can be the following three values:
Dhcp: the DHCP server that dynamically assigns an IP address to the client.
Static: the IP address assigned to the client during the automatic installation process, which is permanently assigned to the client.
Replicant: I use it as a machine for backup and quick recovery.
As I mentioned earlier, replicant I am using here-it is an ideal backup.
After the image is created, you will see the following problems:
Do you want to run the "si_clusterconfig" utility? (Y/[N]): Enter n.
Create a boot Disc
SystemImager allows you to install images on a system without an image system. However, we must tell it where the image comes from, which can be done through the boot disc. To create a boot. iso image (then you can burn a CD), run the following command:
Server:
Si_mkautoinstallcd-append "IMAGESERVER = 192.168.0.100 IMAGENAME = my_golden_client" -- out-file/home/administrator/image. iso
Enter the correct value for the backup storage and image name, and specify the output directory in the-out-file option.
You will be asked to "taste". enter the name of the gold image:
Here is a list of available flavors:
My_golden_client
Standard
Which flavor wowould you like to use? [Standard]: Enter my_golden_client
Restore or install an image on a New System
Server:
On the backup storage, run the following command:
/Etc/init. d/systemimager-server-rsyncd start
Are you sure you can access TCP port 873 (firewall!) from outside !).
Client:
Now, insert the boot disc and start it. Your new system will automatically install the image my_golden_client!
Server:
After the image is restored successfully, you can stop rsyncd:
/Etc/init. d/systemimager-server-rsyncd stop
Update Image
If some important changes have occurred to your gold client, you want to update the previously created image my_golden_client.
Client:
Run on the client:
Si_prepareclient -- server 192.168.0.100
Make sure that your firewall allows connection to tcp port 873.
Server:
Run the following command on the backup storage:
Si_getimage-golden-client 192.168.0.101-image my_golden_client-ip-assignment replicant
Delete an image
Server:
To delete an image from an image server, you only need to enter:
Si_rmimage my_golden_client
Change my_golden_client to the name of the image to be deleted.