How To Back Up An Ubuntu 8.10 System With SystemImager

Channel: Linux
Abstract: and how to create/update/restore/delete images. 1 Preliminary Note I'm using an Ubuntu 8.10 server with the IP address 192.168.0.100 as the SystemImag
How To Back Up An Ubuntu 8.10 System With SystemImager

Version 1.0
Author: Falko Timme

SystemImager lets you create images of your Linux installations. To do so, you need an image server (should have enough disk space to store your images) and a so-called golden client (i.e., the system of which you want to make an image). This means that you have to install some software on your image server and on your golden client in order to run SystemImager. This tutorial shows how to install a SystemImager server and a SystemImager client, both using Ubuntu 8.10, and how to create/update/restore/delete images.

 

1 Preliminary Note

I'm using an Ubuntu 8.10 server with the IP address 192.168.0.100 as the SystemImager server here (I refer to it as the "Server"), and an Ubuntu 8.10 system (can be a server or desktop, depends on what you want to back up) with the IP address 192.168.0.101 (I refer to it as the "Client"). This IP address can be static or assigned via DHCP. I will use the switch -ip-assignment replicant when I create the image; this means that if the client has a static IP adress and you restore the image, the restored system will have exactly the same IP address; if the client got its IP via DHCP, the restored system will get its IP also from DHCP, so the IP can be different after the restoration.

I assume that you're logged in a root on both systems throughout the tutorial - you can do that by typing

sudo su  

I will use the latest stable SystemImager version here (4.0.2 at the time of this writing) which is not available from the Ubuntu 8.10 repositories (the version in the 8.10 repos is 3.2.3, and I could not boot from the boot media when I tried to restore a system with this version).

Please keep in mind that SystemImager is using rsync which means that anybody can access your image server during a restoration process unless you limit the access to certain IP addresses in the rsyncd configuration. Therefore you should be careful when you do this over the Internet (or tunnel rsync through SSH which is not part of this tutorial), but for local networks this should be fine.

 

2 Install SystemImager On The Image Server

Server:

On the image server, you can install SystemImager as follows:

apt-get install syslinux libappconfig-perl mkisofs binutils

wget http://heanet.dl.sourceforge.net/sourceforge/systemimager/systemimager-boot-i386-standard_4.0.2_all.deb
wget http://heanet.dl.sourceforge.net/sourceforge/systemimager/systemimager-common_4.0.2_all.deb
wget http://heanet.dl.sourceforge.net/sourceforge/systemimager/systemimager-initrd-template-i386_4.0.2_all.deb
wget http://heanet.dl.sourceforge.net/sourceforge/systemimager/systemimager-server_4.0.2_all.deb
wget http://heanet.dl.sourceforge.net/sourceforge/systemconfig/systemconfigurator_2.2.11-1_all.deb

dpkg -i systemimager-* systemconfigurator_2.2.11-1_all.deb

 

3 Install SystemImager On The Golden Client

Client:

On the golden client, you can install SystemImager as follows:

apt-get install libappconfig-perl

wget http://heanet.dl.sourceforge.net/sourceforge/systemimager/systemimager-client_4.0.2_all.deb
wget http://heanet.dl.sourceforge.net/sourceforge/systemimager/systemimager-common_4.0.2_all.deb
wget http://heanet.dl.sourceforge.net/sourceforge/systemimager/systemimager-initrd-template-i386_4.0.2_all.deb
wget http://heanet.dl.sourceforge.net/sourceforge/systemconfig/systemconfigurator_2.2.11-1_all.deb

dpkg -i systemimager-* systemconfigurator_2.2.11-1_all.deb

Before you create an image, you should check /etc/fstab and replace all occurences of relatime with defaults. If you don't do this, the restoration process will most likely fail (it did for me) because the kernel of the boot image doesn't know the relatime option.

vi /etc/fstab

My original fstab looks like this:

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# /dev/sda1
UUID=70d7109c-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/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0

As you see there's a relatime in line 6. Therefore I modify the file as follows:

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# /dev/sda1
UUID=70d7109c-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/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0

(You can change it back after the image was created, but you must replace relatime again whenever you update the image on the image server!)

 

4 Create An Image Of The Golden Client On The Image Server

Client:

In order to pull an image from the golden client, you should shut down any firewall on the golden client, or at least allow connection to port 873 TCP (rsync). Now, on the golden client, run the following command:

si_prepareclient --server 192.168.0.100

Server:

On the image server, run

si_getimage -golden-client 192.168.0.101 -image my_golden_client -ip-assignment replicant

where my_golden_client is the name of the image you want to create. -ip-assignment can have one of the following 3 values:

· dhcp -- A DHCP server will assign IP addresses dynamically to clients installed with this image.

· static -- The IP address the client uses during autoinstall will be permanently assigned to that client.

· replicant -- Don't mess with the network settings in this image. I'm using it as a backup and quick restore mechanism for a single machine.

As I said in chapter 1, I'm using replicant here - it's ideal for backups.

At the end of the image creation process, you will see the following question:

Would you like to run the "si_clusterconfig" utility now? (y/[n]): <-- n

Ref From: howtoforge
Channels: ubuntubackup

Related articles