This article will outline how to install the R1Soft agent on a Linux Debian or Ubuntu server manually. There are two methods of installing the agent.
- Using APT
- Using DPKG
Using YUM
Step 1: Configure the YUM repository
APT is used to handle the retrieval, configuration, installation, and removal of software on Debian GNU/Linux distributions. We need to configure an APT repository to manage installations and upgrades to Server Backup Manager. Use the following command to modify your /etc/apt/sources.list to include the R1Soft repository.
echo "deb http://repo.r1soft.com/apt stable main" >> /etc/apt/sources.list
wget http://repo.r1soft.com/r1soft.asc
We now need to download the R1Soft apt gpg key using this command.
apt-key add r1soft.asc
When the APT repository is configured, we now run apt-get update to download the information about the packages in the new repository using the following command
apt-get update
Step 2: Install the package
Use the following command to install the Backup Agent.
apt-get install serverbackup-enterprise-agent
Once the installation is complete, we can proceed to install the Server Backup Linux Device Driver. But first, let us look at another method of installation.
Using DPKG
Step 1: Download the backup agent
You need to have registered as an R1Soft customer to access the Server Backup Manager downloads. Go to this link to log in to the R1Soft customer portal. Navigate to the downloads page and go to the "Backup Agent" product group. Click on the Linux 32-bit (x86) link for 32-bit binary hardware/OS or click the Linux 64-bit (x86_64/AMD64) link for 64-bit binary hardware/OS. Download the ServerBackup-Enterprise-Agent-linux32.zip file for a 32-bit system or the ServerBackup-Enterprise-Agent-linux64.zip file for a 64-bit system.
Step 2: Install the unzip utility
Run the following command to install the unzip utility that allows you to extract the contents of the downloaded zip file.
yum install unzip
You can skip this step if the unzip utility has been installed already.
Step 3: Extract the zip file
Use the following command to create a temporary directory to extract the contents of the downloaded zip file.
mkdir serverbackup-enterprise-agent
Use the following command to move the downloaded zip file to that directory. Linux filenames are case-sensitive so we have to be sure to type the name correctly (in our case, "serverbackup-enterprise-agent-linux32.zip").
mv ServerBackup-Enterprise-Agent-linux32.zip serverbackup-enterprise-agent
use the following command to navigate into that directory.
cd serverbackup-enterprise-agent
Use the following command to use the unzip utility to extract the contents of the archive.
unzip ServerBackup-Enterprise-Agent-linux32.zip
Step 4: Install the packages
The archive you have extracted contains two folders: one with .deb packages (in our case, "agent-deb-linux64") and one with .rpm packages ("agent-rpm-linux64"). On RedHat and CentOS, select the .rpm package. Each folder contains a set of the Server Backup components: serverbackup-setup, serverbackup-agent, serverbackup-async-agent-2-6, and serverbackup-enterprise-agent. Navigate to the folder with the packages i.e. deb-linux32 and run the following command.
dpkg -i *.rpm
This will install all the components in one step. Note that you need root privileges to install packages.
Now that we have looked at the two methods of installing the Server Backup Manager, let us look at installing install the Server Backup Linux Device Driver.
Installing the Server Backup Linux Device Driver
The Server Backup Device Driver is an R1Soft proprietary, loadable Linux kernel module. It is loaded at run-time without restarting Linux, and you do not need to recompile your Linux kernel to use it. R1Soft does not provide prebuilt modules for the popular kernels anymore, so you will have to compile the module from the source.
Step 1: Compile Server Backup Kernel Module Against the Kernel Source Tree
We will compile the kernel module using the kernel headers. The serverbackup-setup program will obtain all the information needed to compile a module from your running kernel. For the kernel module compilation to work, you must have internet connectivity directly from the Linux server on which you are installing Server Backup, to TCP port HTTPS (443), on the host krnlbld.r1soft.com.
You can test connectivity with the following command.
serverbackup-setup --test-connection
Step 2: Install the kernel sources
For an unmodified kernel provided by the Ubuntu installer, install the kernel-devel package using the following command.
apt-get install linux-headers-`uname -r`
Step 3: Build the Server Backup Kernel Module with a connection to the R1Soft build server
Use the following command to try and build the module with a direct internet connection to the R1Soft build server.
serverbackup-setup --get-module
If you see the following output, the module has been compiled and installed successfully.
Saving kernel module to '/lib/modules/r1soft/hcpdriver-cki-3.2.0-29-generic.ko'
Kernel module is now installed.
Use '/etc/init.d/cdp-agent restart' to load the new driver
Step 4: Build the Server Backup Kernel Module offline
If you cannot connect to the R1Soft build server, you can still build and compile the kernel module. To do this, we will create a tarball file with the kernel headers. Then we copy this file to a computer that can connect to the R1Soft build server. From this computer, we will upload the tarball file to the R1Soft build server for building and compiling. After compilation is complete, we will download the compiled binary module and copy it back to the server where the Backup Agent is installed. Use the following command to do this.
serverbackup-setup --no-binary --kernel-dir /usr/src/kernels/YOUR_KERNEL_TREE --tarball-only /tmp/kernel-headers-for-r1soft.tar.gz
You will see the following output.
Gathering kernel information
Gathering kernel information complete.
Creating kernel headers package
Checking '/usr/src/kernels/2.6.32-279.14.1.el6.i686' for kernel headers
Found headers in '/usr/src/kernels/2.6.32-279.14.1.el6.i686'
Compressing...
Header package created '/tmp/kernel-headers-for-r1soft.tar.gz'
visit [https://krnlbld.r1soft.com/] to do an offline module build
After it is complete, you will need to copy the module to /lib/modules/r1soft
The instructions for uploading and compiling can be seen in the generated output. Congratulations! You have successfully installed the R1Soft backup agent manually.