Using gNetic

[Top] [Contents] [Index] [ ? ]

Gnetic user's manual

Gnetic user's manual

Copyright © 2008 Joan Lledó

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1. Introduction

Copyright (C) 2008 Joan Lledó. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with the Invariant Sections being list their titles, with the Front-Cover Texts being list, and with the Back-Cover Texts being list.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.1 Description

Gnetic is an Free Software project developed in C for creating and restoring backup copies of a disk or partition. It is also possible to work over the internet, sending the images through the web from your destination, or on the fly, generating the image in real time while it is transferred over the internet.

The web page of Gnetic is Y el programa puede ser descargado desde

Please send your bug reports to Include information about your system and include a description of what caused the error, what the consequences were, etc.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.2 Nomenclature

It is important to know the nomenclature of gnetic. All of the the terms form part of an analogy (more or less) between a chain of DNA and a chain of bits, which store all of the information of a living being or a computer, respectively. Also, the term "clone" is used in biology as in computing. The last case refers to the transfer of all the information from one computer to another, or from one CD to another, and make a perfect copy.

In Gnetic, the backup copies are files called DNA images, because they contain all of the information necessary for a computer to be able to create a perfect copy of another computer. Working over the internet, there are two types of computers in Gnetic: the server, and the client (or clients).

  • Server: There is only one in a Gnetic network. It is the computer that will transmit the image to the client or clients.
  • Client: There is at least one client in a Gnetic network, but there can be up to 64 (This number can increase or decrease if specified from the command line). It receives the image from the server. The client can:
    • Restore the image "on the fly": The client will lose all of the data on the disk, or partition that is selected in order to arrange the image that will be received from the network. After the successful completion of this operation, the partition or disk in question will contain all of the information saved in the image.
    • Save the image to a disk: It is as simple as the computer receiving an image and saving it to the disk as a regular file. This image can be used later to restore data.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.3 Filesystems

All of the code of Gnetic that interacts with the physical devices, disks or partitions, is based on GNU Parted. So Gnetic depends to a great extent on the systems that Parted supports. You can see a list of the systems supported by Parted at

The following table shows them:



Required tool






e2fsprogs (mke2fs)



jfs utils (jfs_mkfs)



xfs utils (mkfs.xfs)



reiserfs utils (mkreiserfs)





?? (1)

hfs utils (hformat)









mkntfs (mkntfs)

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.4 Required Software

It is necessary to have the library libparted-1.6 or later installed, without it Gnetic will not function. The libraries e2fs, uuid, and libselinux are also required. Also, in order to create some filesystems it is necessary to have some applications. Gnetic works fine without them, but you cannot restore images if you don't have the necessary utility associated with that filesystem. To know which utility is needed for a particular system you can refer to the the table of Filesystems.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.5 Compliling Gnetic

As usual, to compile gnetic you only have to execute the classic commands:


And if you wish to install it on your system, execute as root:

	make install

It is necessary to make sure that you possess the development libraries necessary for the compiliation: - libparted-dev (1.6 o later) - e2fslibs-dev - uuid-dev - libselinux1-dev

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.6 Supported Platforms

Currently, only Gnetic has been compiled in GNU / Linux.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.7 Terms of Distribution

Gnetic is Free Software, with the GNU General Public License Version 2. The complete license is included with Gnetic in the file COPYING. In any case, you can write to Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2. Using Gnetic

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.1 Local Use

El uso local de Gnetic se reduce a crear imágenes ADN de un disco o partición, o restaurar imágnes previamente creadas en un disco o partición. Local use of Gnetic is limited to creating DNA images of a disk or partition, or restoring images created previously on a disk or partition.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.2 Network Use

Gnetic permits you to work over the internet, and here is where it really becomes useful, as it allows you to restore images created on another computer. It is important to consider whenever working with Gnetic on a network, all of the clients should be waiting before launching Gnetic on the server. An explanation of the possibilities of Gnetic over a network follows.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.2.1 Point a point

This way of working opens a TCP connection between two machines. The server should specify the IP address of the client. However, the client should be left waiting for the server's contact in order to transfer the DNA image.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.2.2 Link Mode

This mode is based on the formation of a network into a chain in which the server organizes all of the clients so that each node or link in the chain only sends data to the following link. To use this technique, the clients are left waiting while the server contacts each of them and gives them a place in the chain. Once this network is formed, the server begins to send its data and the clients will transmit this following in the order of the chain until the data arrives at the last. At the same time, they are writing this same information to their hard disk. You can download a diagram explaining how the clients are organized at the following link:

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.3 Using the command line

Here will detail in the most depth how to use Gnetic from the command line.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.3.1 Synopsis

gnetic FUNCTION [ -d, --device DEVICE ] [ -f, --file FILE ]
[ -a, --address CLIENT-IP ] [ -m, --max-hosts NUMBER ]
[ -w, --wait SECONDS ] [ -q, --quick ]
[ -b, --broadcast IP-BROADCAST ] [ -n, --no-data ]
[ -g, --grub-install BOOT-PARTITION ]


-d, --device:

The device you are going to use. Examples: "/dev/hda", "/dev/hdb2"

-f, --file:

The file you are going to make. Example: "~/backups/hda.dna"

-a, --address:

IP address you are going to contact. Example ""

-m, --max-hosts:

Number of links the network will support. The bigger this number is, the more RAM gnetic will consume. If you don't use this, the figure will be 64.

-w, --wait

Time in seconds that the server should wait while the clients answer. By default it is 5 seconds.

-q, --quick

This option eliminates the progress bar to gain speed.

-b, --broadcast

With this option you can specify the address to broadcast over the network in case gnetic is unable to determine it.

-n, --no-data

Use this option to save the structure of the partitions without data.

-g, --grub-install

Install grub without performing any other operation.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.3.2 Generic Options

These options don't involve the use of any other, and they can be used locally as well as over the network.

-m, --max-hosts

Specify the maximum number of clients the network will support. If none are specified, a maximum of 64 nodes will be established. Only takes affect if used by the server of the chain. Example: gnetic -sd /dev/hda -m 100
Send the contents of /dev/hda over the network and specify that it can support up 99 clients.

-w, --wait

Sets the waiting time for clients's response.
By default 5 seconds.
Only has effect if used by the server of a chain.
Example: gnetic -sd /dev/hda -w 20
Wait 20 seconds for the clients to answer and after that send the contents of /dev/hda

-q, --quick

This option eliminates the progress bar to gain speed.
Only has effect if you use the option -d, when you only use option -f, the progress bar does not appear in either mode.
Example: gnetic -cd /dev/hda1 -f /home/user/hda1.dna -q
Save the contents of /dev/hda1 in /home/user/hda1.dna without showing the progress bar.

-n, --no-data

Saves in the image only the partition table, with no data.
It can be used both locally and networking.
It only works when working with disks, no partitions.
Example: gnetic -cd /dev/hda -f /home/user/hdb1-nodata.dna -n
Only save the partition table of /dev/hda, without data.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.3.3 Functions

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ] Local Use

All of these options involve the use of -d and -f. In all of the cases the order of the parameters is irrelevant.

-c, --create

Create an image of a disk or partition.
Example: gnetic -cd /dev/hda -f ~/backups/hda.dna
Save the contents of /dev/hda in ~/backups/hda.dna

-r, --restore

Restore an image to a disk or partition.
Example: gnetic -rf ~/backups/hda.dna -d /dev/hda
Restore the contents of ~backups/hda.dna to /dev/hda

-g, --grub-install

Install grub in the device specified.
Ejemplo: gnetic -g /dev/hda1 -d /dev/hda
Install GRUB in the MBR of /dev/hda using the configuration files of GRUB located in /dev/hda1

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ] Network Use

All of the network options involve the use of -d or -f. Depending on whether what you want to send or receive is an image or a device.

Point to point connection

-S, --p2p-server

Send the data (the option involves -a)
Example: gnetic -Sa -d /dev/hda
Send the contents of /dev/hda to If the DNS name of the host is entered in place of an IP, gnetic will determine your IP.

-C, --p2p-client

Receive the data.
Example: gnetic -Cd /dev/hda
Receive information from the network and save it in /dev/hda.

Example: gnetic -Cf ~/backups/hda.dna
Receive information from the network and save in ~/backups/hda.dna
(useful to create remote images)

Chain Mode connection

-s, --sender-mode

Server, first link, Transmits its data.
Example: gnetic -sd /dev/hda
Send to the data of /dev/hda to the chain

Example: gnetic -sd /dev/hda -b
Send the data of /dev/hda to the chain and specify the broadcast address of this network to

-l, --link-mode

Client, receive the data of the server
Example: gnetic -ld /dev/hda
The computer becomes node of the chain and saves the data received to /dev/hda

Ejemplo: gnetic -lf ~/backups/hda.dna
The computer becomes node of the chain and saves the data received to .DNA file.
This is useful if you want to clone computers on the fly and then save an image in one of the nodes, for example the last one.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3. After using Gnetic

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1 The boot sector

When you decide to create an image of an entire hard disk, the boot sector is also saved. This means that you have installed GRUB, this will be cloned as well with all of its options to the receiving machine. This will not be so if you only clone a partition. If you wish, you can use gnetic to install GRUB after restoring a system or partition.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.2 Partitions

It is possible that you created an image of a 40GB hard disk in the server, but afterwards you intend to restore this information on a 20GB hard disk (for example). This is not a problem for gnetic, the program only saves your files in the image, so if your files only occupy 10GB, the image will restore without problems. Additionally, the partitions adjust to the proportion they occupied in the original, which is to say, if you have a partition that occupied 70% of a 40GB disk, on the client the partition will occupy 70% of the 20GB disk, so long as your files can fit on that space, in any other case gnetic will return an error. If the original disk is smaller than the destination, the partitions will increase proportionally.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4. Authors

Gnetic was written by Jesús Burgos Maciá<> with the help of Joan Lledó <>

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5. Index

Jump to:   C   D   E   F   G   L   N   P   R   S   U   X  
Index Entry Section

compiling1.5 Compiling Gnetic
contact1.1 Description

Dependencies1.4 Required Software

e2fs1.4 Required Software
e2fs-dev1.5 Compilando Gnetic
ext21.3 Filesystems
ext31.3 Filesystems

fat161.3 Filesystems
fat321.3 Filesystems

GPL1.7 Terms of distribution

libparted1.3 Filesystems
libparted1.4 Required Software
libparted-dev1.5 Compiling Gnetic
libselinux1.4 Required Software
libselinux-de1.5 Compiling Gnetic

nomenclature1.2 Nomenclature

platforms1.6 Supported platforms

receviver1.2 Nomenclature
report, bugs1.1 Description
report of bugs1.1 Description

uuid1.4 Required software
uuid-dev1.5 Compiling Gnetic

xfs1.3 Filesystems

Jump to:   C   D   E   F   G   L   N   P   R   S   U   X  

[Top] [Contents] [Index] [ ? ]



It has not been tested yet

[Top] [Contents] [Index] [ ? ]

Table of Contents

[Top] [Contents] [Index] [ ? ]

About This Document

This document was generated by Joan Lledó on May, 6 2008 using texi2html 1.78.

The buttons in the navigation panels have the following meaning:

Button Name Go to From 1.2.3 go to
[ < ] Back Previous section in reading order 1.2.2
[ > ] Forward Next section in reading order 1.2.4
[ << ] FastBack Beginning of this chapter or previous chapter 1
[ Up ] Up Up section 1.2
[ >> ] FastForward Next chapter 2
[Top] Top Cover (top) of document  
[Contents] Contents Table of contents  
[Index] Index Index  
[ ? ] About About (help)  

where the Example assumes that the current position is at Subsubsection One-Two-Three of a document of the following structure:

  • 1. Section One
    • 1.1 Subsection One-One
      • ...
    • 1.2 Subsection One-Two
      • 1.2.1 Subsubsection One-Two-One
      • 1.2.2 Subsubsection One-Two-Two
      • 1.2.3 Subsubsection One-Two-Three     <== Current Position
      • 1.2.4 Subsubsection One-Two-Four
    • 1.3 Subsection One-Three
      • ...
    • 1.4 Subsection One-Four

This document was generated by Joan Lledó on May, 6 2008 using texi2html 1.78.

Valid HTML 4.01 Transitional Valid CSS!