Installation
From FSArchiver
Installation
There are two ways to use FSArchiver. You can either download a livecd with this program on it (eg: any recent SystemRescueCd), or you can install it on a linux system on your computer. If you want to install FSArchiver, you can either compile it from sources or just copy the static binary.
Installation from sources
If you want to compile it from sources, you will need to have the following libraries installed on your system, including their header files. On RPM based distributions, you often have to install packages such as libXXX-devel.rpm to have the header files, since the base package (libXXX.rpm) does not provide these files. Here are the required libraries:
- zlib (and zlib-devel)
- liblzo (and lzo-devel)
- bzip2-libs (and bzip2-devel)
- libgcrypt (and libgcrypt-devel)
- libblkid (and libblkid-devel)
- e2fsprogs-libs (e2fsprogs-devel)
- xz-4.999.9beta or newer (provides lzma compression support)
If libraries or header files are missing:
- In case you don't have the xz/liblzma or liblzo installed, you have the ability to compile fsarchiver with no support for lzma or lzo:
./configure --prefix=/usr --disable-lzma --disable-lzo && make && make install
- If you don't have libgcrypt installed on your system, or if it cannot compile because your don't have the header files, you can disable the support for encryption using that option:
./configure --prefix=/usr --disable-crypto && make && make install
You can also use the static that provides support for all the compression levels and which does not require the libraries to be installed on your system.
To compile the sources, you have to run follow these instructions, which are valid for fsarchiver-0.2.4 and newer:
1. download the latest sources
First, you have to download the latest sources, it's a file called fsarchiver-x.y.z.tar.gz. Just save it to a temporary directory.
2. extract the sources in a temporary directory
mkdir -p /var/tmp/fsarchiver cd /var/tmp/fsarchiver tar xfz /path/to/fsarchiver-x.y.z.tar.gz
3. compile and install from sources
cd /var/tmp/fsarchiver/fsarchiver-x.y.z ./configure --prefix=/usr make && make install
Installation of the precompiled binary
If the compilation does not work, you can just download the static binary, extract it, and copy the binary somewhere on your system (/usr/sbin for instance). There is just one 32bit binary for i386. If you are using a 64bit linux, this binary should work since most the 64bit linux kernels are able to execute 32bit binary, thanks to the option CONFIG_IA32_EMULATION.
Uninstalling fsarchiver is easy since it only installs one file on your system, which is the compiled binary. To uninstall fsarchiver, just remove /usr/sbin/fsarchiver.
Dependencies
FSArchiver has to kind of dependencies: libraries and file-system tools.
libraries dependencies
Several libraries with their header files are necessary to compile the sources (cf previous section about installation) and to execute the program if it has not been compiled in a static way. You can avoid the problem with libraries dependencies by using the static binary that you can download from the sourceforge download page.
file-system tools required
The file-system tools for the file-system you are using are required to restore a file-system.
You should not have any problem with the file-system tools (such as a program which is missing because it is not installed) when you save the file-system (using fsarchiver savefs). You only need the file-system tools (such as e2fsprogs, reiserfsprogs, xfsprogs, ...) when you want to restore a file-system. And it should not really be a problem since you often want to restore a file-system by booting from a livecd such as SystemRescueCd, since you cannot restore your root file-system when you are using it, so booting from a livecd / usb-stick is mandatory in that case.
FSArchiver only requires the tools that match the file-system of the restoration. For instance, if you are trying to restore an archive to a reiserfs partition, you will need the reiserfsprogs to be available, even if the original filesystem was ext3 when you saved the file-system to an archive.
Distribution specific information
installation on fedora using yum
Recent Fedora releases provide an official package for fsarchiver where all the optional features are enabled (lzma compression, encryption, ...). You can just use the following command to download and install fsarchiver and all its dependencies.
yum install fsarchiver
installation on ubuntu
There is now an official fsarchiver package for Ubuntu-10.04 (Lucid Lynx) in the universe repository. It can be installed with the standard command on Lucid:
sudo apt-get install fsarchiver
Ilya Barygin built a package for Ubuntu-9.10 (Karmic Koala). See the PPA page for instructions on how to enable that repository. After enabling the PPA, you can install fsarchiver with the standard apt-get command.
If you want to compile it by hand on Ubuntu, here are the instructions to install the required libraries and to compile the sources on Ubuntu (tested on ubuntu 8.10 and 9.04)
apt-get install zlib1g-dev libssl-dev libbz2-dev liblzo2-dev e2fslibs-dev attr-dev libblkid-dev uuid-dev libgcrypt11-dev tar xfz fsarchiver-0.6.10.tar.gz cd fsarchiver-0.6.10 ./configure --prefix=/usr --disable-lzma && make && make install
installation on debian
Thanks to Michael Biebl there is now a fsarchiver deb package for debian. You can just install it with the normal command:
apt-get update apt-get install fsarchiver/testing
installation on arch-linux using pacman
There is now an official package for fsarchiver in arch-linux: for both i686 and x86_64. You can install it with the following command:
pacman -S fsarchiver
installation on SUSE
- There is an official fsarchiver package for Suse.
- There are three ways to install software in SUSE:
- First, following the link above with "one click install" -- simpliest way.
- Second, add additional repository and install with GUI-tool YaST.
- Third, add additional repository and install with CLI-tool zypper.
- To add a repository with the CLI: zypper ar <repository-url> (see repository addresses below)
- To install fsarchiver with the CLI: zypper in fsarchiver
- Repositories:
- openSUSE 11.2 stable:
- openSUSE 11.2 unstable:
- openSUSE 11.1
- openSUSE 11.0
- SLE 11 (SLES+SLED)
- openSUSE Factory
- Here is the command to install development packages if you want to compile it by hand:
- zypper install libgcrypt-devel lzo-devel zlib-devel xz-devel libbz2-devel libext2fs-devel libblkid-devel libuuid-devel libattr-devel
compilation from sources on debian
Here are the instructions to install the required libraries and to compile the sources on Debian (tested on debian lenny)
apt-get install e2fsprogs e2fslibs-dev libblkid-dev liblzo2-dev libbz2-dev zlib1g-dev uuid-dev libattr1-dev libgcrypt11-dev tar xfz fsarchiver-0.6.10.tar.gz cd fsarchiver-0.6.10 ./configure --prefix=/usr --disable-lzma && make && make install
Unfortunately, there is no stable package for liblzma yet, so you cannot compile support for lzma if you only have stable packages on your system. If you want to enable the support for lzma in fsarchiver, you will have to install liblzma-dev using apt-get. It's part of the experimental repository, so you will have to add it in your sources.list first, and then you can compile fsarchiver with the support for lzma compression:
apt-get install e2fsprogs e2fslibs-dev libblkid-dev liblzo2-dev libbz2-dev zlib1g-dev uuid-dev libattr1-dev liblzma-dev libgcrypt11-dev tar xfz fsarchiver-0.6.10.tar.gz cd fsarchiver-0.6.10 ./configure --prefix=/usr && make && make install
compilation from sources on rhel / centos
If you are using Fedora, you don't have to compile the sources, since there is an official fsarchiver package. Here are the instructions to install the required libraries and to compile the sources on rhel/centos:
yum install zlib-devel bzip2-devel lzo-devel e2fsprogs-devel libgcrypt-devel libattr-devel tar xfz fsarchiver-0.6.10.tar.gz cd fsarchiver-0.6.10 ./configure --prefix=/usr --disable-lzma --disable-lzo && make && make install
compilation from sources on gentoo
Gentoo implements the support for packages using ebuild files. There is no official ebuild for fsarchiver in gentoo yet, but you can use it on gentoo anyway. You can just use the ebuild files from the gentoo-sunrise or you can use the build which comes with the official fsarchiver sources:
- Download the official fsarchiver sources
- Extract fsarchiver-x.y.z.tar.gz to a temporary directory
- Create a portage-overlay directory:
mkdir -p /home/portage-overlay/sys-fs/fsarchiver
- Copy the build script from the official sources in this directory (with the right version number in the filename):
cp fsarchiver-x.y.z/distrib/gentoo/fsarchiver-x.y.z.ebuild /home/portage-overlay/sys-fs/fsarchiver/fsarchiver-0.6.10.ebuild
- Add the path to the overlay directory in your /etc/make.conf:
PORTDIR_OVERLAY="/home/portage-overlay"
- validate the ebuild script:
cd /home/portage-overlay/sys-fs/fsarchiver rm -f Manifest ebuild fsarchiver-0.6.10.ebuild digest
- Add sys-fs/fsarchiver to your /etc/portage/package.keyworks if required:
echo "sys-fs/fsarchiver ~*" >> /etc/portage/package.keywords
- Change the USE if you want non-default compilation options:
echo "sys-fs/fsarchiver lzma lzo gcrypt static" >> /etc/portage/package.use
- Run the installation command:
emerge sys-fs/fsarchiver
