About DRLM Docs

DRLM Docs contains comprehensive documentation on the DRLM (Disaster Recovery Linux Manager). This page describes documentation’s licensing, editions, and versions, and describes how to contribute to the DRLM Docs.

For more information on DRLM, see About DRLM Project. To download DRLM, see the downloads page.

License

This documentation is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (i.e. “CC-BY-NC-SA”) license.

The DRLM Manual is copyright © 2016 Brain Updaters, S.L.L.

Contributing

Please, we encourage you to help us to improve this documentation.

To contribute to documentation the Github interface enables users to report errata or missing sections, discuss improvements and new sections through the issue-tracker at: DRLM Docs GitHub Issue Tracker.

Note

This documentation is under constant development. Please be patient...

Contents:

About DRLM Docs

DRLM Docs contains comprehensive documentation on the DRLM (Disaster Recovery Linux Manager). This page describes documentation’s licensing, editions, and versions, and describes how to contribute to the DRLM Docs.

For more information on DRLM, see About DRLM Project. To download DRLM, see the downloads page.

License

This documentation is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (i.e. “CC-BY-NC-SA”) license.

The DRLM Manual is copyright © 2016 Brain Updaters, S.L.L.

Contributing

Please, we encourage you to help us to improve this documentation.

To contribute to documentation the Github interface enables users to report errata or missing sections, discuss improvements and new sections through the issue-tracker at: DRLM Docs GitHub Issue Tracker.

Note

This documentation is under constant development. Please be patient...

User Documentation

DRLM Quick Start Guide

DRLM Installation

Follow the steps at DRLM Installation. (Select your OS)

Add Network to DRLM Server

First of all we must add the network where the ReaR clients are. To do this we have to use the command “drlm addnetwork” with the parameters -i “Network IP” network”, -g “Gateway IP”, -s “Server IP of the network”, -n “Network Name” and -m “Netmask”.

$ drlm -vD addnetwork -i 192.168.1.0 -g 192.168.1.1 -s 192.168.1.38 -n BuLan -m 255.255.255.0

Add Client to DRLM Server

Now we can add a ReaR client with the command “drlm addclient” and the parameters -n “Network Name”, -i “ReaR client IP”, -M “ReaR client MAC address” and -c “ReaR client hostname”.

$ drlm -vD addclient -n BuLan -i 192.168.1.45 -M 00:13:20:fe:48:16 -c minBUC

ReaR Client Installation

Follow the steps at ReaR Client Installation. (Select your OS)

Run Client Backup

We are ready to take OS backups!!! At this point we have the DRLM server and ReaR client configured, you just have to run the command “drlm runbackup” with the parameter -c “ReaR client host name”

$ drlm -vD runbackup -c ReaRCli1

Restore Client Backup

Follow the steps at DRLM Client Recover.

DRLM Installation

The pourpose of this manual is explain, step by step, the installation and configuration of DRLM. At the end of this guide you should have a fully functional DRLM server.

Debian 7

Note

On the following steps, is assumed you have a minimal installation of Debian 7.

Install requirements
$ apt-get install openssh-client openssl netcat-traditional wget gzip tar gawk sed grep coreutils util-linux nfs-kernel-server rpcbind isc-dhcp-server tftpd-hpa syslinux apache2
Get DRLM

You can obtain the DRLM package building it from the source code or downloading from www.drlm.org website

Build DEB package from Source

$ aptitude install git build-essential debhelper
$ git clone https://github.com/brainupdaters/drlm
$ cd drlm
$ make deb

Download DEB package From DRLM Web

$ wget http://www.drlm.org/downloads/drlm_1.1.3_all.deb
Install DRLM package

The DEB package can be installed as follows (on Debian, Ubuntu)

Execute the next command:

$ dpkg -i drlm_1.1.3_all.deb

Directory structure:

$ mkdir -p /var/lib/drlm/arch
$ mkdir -p /var/lib/drlm/store/pxelinux.cfg

pxelinux.0:

$ cp -p /usr/lib/syslinux/pxelinux.0 /var/lib/drlm/store/
$ chmod 755 /var/lib/drlm/store/pxelinux.0
DRLM Configuration
$ vi /etc/drlm/local.conf
STORDIR=/var/lib/drlm/store
ARCHDIR=/var/lib/drlm/arch
DHCP_SVC_NAME="isc-dhcp-server"

Add drlm-stord service to start up scripts.

$ update-rc.d drlm-stord defaults
DRLM Components Configuration

This section covers configuration of:

  • GRUB
  • TFTP Service
  • NFS Service
  • DHCP Service
  • HTTP Service
Configuring loop limits

The default configuration allows up to eight active loop devices. If more than eight file-based guests or loop devices are needed the number of loop devices configured can be adjusted adding the parameter max_loop=1024 in the /etc/default/grub file as follows:

...

GRUB_CMDLINE_LINUX="quiet max_loop=1024" ##UPDATE THIS LINE

...
$ grub-mkconfig -o /boot/grub/grub.cfg
TFTP

You have to update the destination folder in the /etc/default/tftpd-hpa cofiguration file as follows

# /etc/default/tftpd-hpa
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/var/lib/drlm/store"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure"

Service Management:

$ update-rc.d tftpd-hpa defaults
$ service tftpd-hpa restart
NFS

We don’t have to configure the /etc/exports file, the file is automatically maintained by DRLM.

Service Management:

$ update-rc.d nfs-kernel-server defaults
$ update-rc.d rpcbind defaults
DHCP

Same as /etc/exports file, configuration of /etc/dhcp/dhcpd.conf file is not required, the file is automatically maintained by DRLM.

Service Management:

$ update-rc.d isc-dhcp-server defaults
HTTP
$ a2enmod ssl
$ a2enmod rewrite

Edit /etc/apache2/apache2.conf file

# Include the DRLM Configuration:
Include /usr/share/drlm/conf/HTTP/https.conf
$ rm /etc/apache2/sites-enabled/*

Edit /etc/apache2/ports.conf file

#NameVirtualHost *:80
#Listen 80
$ update-rc.d apache2 defaults
service apache2 restart
Restart & check all is up & running
$ service tftpd-hpa status
in.tftpd is running.
$ service rpcbind status
rpcbind is running.
$ service apache2 status
Apache2 is running (pid 2023).
$ service nfs-kernel-server status
nfsd not running
$ service isc-dhcp-server status
Status of ISC DHCP server: dhcpd is not running.

Note

If DHCP or NFS not running is because there is no config yet! no worries they will be reloaded after first DRLM client will be added.

CentOS 6, Red Hat 6

Note

On the following steps, is assumed you have a minimal installation of CentOS 6.

Warning

iptables and selinux has been disabled

$ cat /etc/sysconfig/selinux

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted
$ setenforce 0

Note

It is not a requirement to disable SELinux and IPTABLES, but to work with DRLM Server must be properly configured. We have disabled these features for easier installation.

IPTABLES

$ chkconfig iptables off
$ service iptables stop
Install requirements
$  yum -y install openssh-clients openssl nc wget gzip tar gawk sed grep coreutils util-linux rpcbind dhcp tftp-server syslinux httpd xinetd nfs-utils nfs4-acl-tools mod_ssl
Get DRLM

Build RPM package from Source

$ yum install git rpm-build
$ git clone https://github.com/brainupdaters/drlm
$ cd drlm
$ make rpm

Download RPM package From DRLM Web

$ wget http://www.drlm.org/downloads/drlm-1.1.3-1git.el6.noarch.rpm
Install DRLM package

The RPM package can be installed as follows (on Redhat, CentOS)

Execute the next command:

$ rpm -ivh drlm-1.1.3-1git.el6.noarch.rpm

Directory structure:

$ mkdir -p /var/lib/drlm/arch
$ mkdir -p /var/lib/drlm/store/pxelinux.cfg

pxelinux.0:

$ cp -p /usr/share/syslinux/pxelinux.0 /var/lib/drlm/store/
$ chmod 755 /var/lib/drlm/store/pxelinux.0
DRLM Configuration
$ vi /etc/drlm/local.conf
STORDIR=/var/lib/drlm/store
ARCHDIR=/var/lib/drlm/arch

Add drlm-stord service to start up scripts.

$ chkconfig drlm-stord on
DRLM Components Configuration

This section covers configuration of:

  • GRUB
  • TFTP Service
  • NFS Service
  • DHCP Service
  • HTTP Service
Configuring loop limits

The default configuration allows up to eight active loop devices. If more than eight clients are needed, the number of loop devices configured can be adjusted adding the parameter max_loop=1024 in the /etc/grub.conf file as follows:

title Red Hat Enterprise Linux (2.6.32-358.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-358.el6.x86_64 ro root=/dev/mapper/vgroot-lvroot rd_NO_LUKS LANG=en_US.UTF-8  KEYBOARDTYPE=pc KEYTABLE=es rd_NO_MD rd_LVM_LV=vgroot/lvswap SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=vgroot/lvroot rd_NO_DM rhgb quiet max_loop=1024
initrd /initramfs-2.6.32-358.el6.x86_64.img
TFTP

You have to update the /etc/xinetd.d/tftp cofiguration file as follows:

service tftp
{
        socket_type = dgram
        protocol = udp
        wait = yes
        user = root
        server = /usr/sbin/in.tftpd
        server_args = -s /var/lib/drlm/store
        disable = no
        per_source = 11
        cps = 100 2
        flags = IPv4
}

Service Management:

$ chkconfig xinetd on
$ service xinetd start
NFS

We don’t have to configure the /etc/exports file, the file is automatically maintained by DRLM.

Service Management:

$ chkconfig rpcbind on
$ service rpcbind start
$ chkconfig nfs on
$ service nfs start
DHCP

Same as /etc/exports file, configuration of /etc/dhcp/dhcpd.conf file is not required, the file is automatically maintained by DRLM.

Service Management:

$ chkconfig dhcpd on
$ service dhcpd start
HTTP

Disable the default Virtual Host and configure the server to work with SSL.

We have to edit de /etc/httpd/conf.d/ssl.conf, comment or delete the Virtual host and include the DRLM http default configuration at the end of it.

Coment from here --->
##
## SSL Virtual Host Context
##


     At the end of the file and insert:
# Include the DRLM Configuration:
Include /usr/share/drlm/conf/HTTP/https.conf

Then we have to coment the 80 port service commenting or deleting the next lines in /etc/httpd/conf/httpd.conf file.

#Listen 80

#ServerAdmin root@localhost

#DocumentRoot "/var/www/html"

#<Directory />
#    Options FollowSymLinks
#    AllowOverride None
#</Directory>

#<Directory "/var/www/html">
#    Options Indexes FollowSymLinks
#    AllowOverride None
#    Order allow,deny
#    Allow from all
#</Directory>

#ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

#<Directory "/var/www/cgi-bin">
#    AllowOverride None
#    Options None
#    Order allow,deny
#    Allow from all
#</Directory>

To finish we have to comment the ErrorLog and CustomLog lines in /usr/share/drlm/conf/HTTP/https.conf file.

#       ErrorLog ${APACHE_LOG_DIR}/error.log

#       CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined

Service Management:

$ chkconfig httpd on
$ service httpd start
Restart & check all is up & running
$ service xinetd status
xinetd (pid  5307) is running...
$ service rpcbind status
rpcbind (pid  5097) is running...
$ service httpd status
httpd (pid  5413) is running...
$ service nfs status
rpc.svcgssd is stopped
rpc.mountd (pid 5216) is running...
nfsd (pid 5232 5231 5230 5229 5228 5227 5226 5225) is running...
$ service dhcpd status
dhcpd is stopped

Note

If DHCP or NFS not running is because there is no config yet! no worries they will be reloaded after first DRLM client will be added.

DRLM Client Installation

Debian 7

ReaR requirements for DRLM

As rear is written in bash you need bash as a bare minimum. Other requirements are:

  • syslinux (for i386 based systems)
  • ethtool
  • genisoimage
  • parted
  • gawk
  • attr
  • sudo
  • curl (rear need to get its configuration from DRLM server)
  • mingetty (rear is depending on it in recovery mode)
$ apt-get install syslinux ethtool genisoimage parted gawk attr sudo curl mingetty
Download and install ReaR

Note

Minimum version required of ReaR: 1.17.0

Download ReaR

$ wget http://download.opensuse.org/repositories/Archiving:/Backup:/Rear/Debian_7.0/all/rear_1.17.2_all.deb

You can download other ReaR versions from ReaR Download Page or from OpenSuse Build Service .

Install ReaR package

The DEB based package can be installed as follows

Execute the next command:

$ dpkg -i rear_1.17.2_all.deb

Note

For more information about ReaR visit: http://relax-and-recover.org/documentation

Create DRLM User
$ useradd -d /home/drlm -c "DRLM User Agent" -m -s /bin/bash -p $(echo S3cret | openssl passwd -1 -stdin) drlm
Disable password aging for drlm user
$ chage -I -1 -m 0 -M 99999 -E -1 drlm
Copy rsa key from DRLM Server to the new client

Warning

You have to execute this code from DRLM Server. The password which you will be asked for is “S3cret” and “client_ipaddr” must be changed to the client ip address.

$ ssh-keygen -t rsa
$ ssh-copy-id drlm@"client_ipaddr"
Disable password login
$ passwd -l drlm
Add Sudo roles for DRLM user

Edit /etc/sudoers.d/drlm and add the following lines

Cmnd_Alias DRLM = /usr/sbin/rear*
drlm    ALL=(root)      NOPASSWD: DRLM

Change /etc/sudoers.d/drlm permissions

$ chmod 440 /etc/sudoers.d/drlm
Client configuration

We have to specify that this ReaR client is managed from a DRLM server. We have to edit the /etc/rear/local.conf and insert the next line.

DRLM_MANAGED=y
Add client config file at DRLM server

Warning

You have to do this at DRLM Server.

We have to add a new file called as “client host name”.cfg at /etc/drlm/clients/ For example: If our client host name is ReaRCli1 we have to create /etc/drlm/clients/ReaRCli1.cfg and add the follwing lines. Where CLI_NAME=”Client Host Name” and SRV_NET_IP=”DRLM Server IP”.

CLI_NAME=ReaRCli1
SRV_NET_IP=192.168.1.38

OUTPUT=PXE
OUTPUT_PREFIX=$OUTPUT
OUTPUT_PREFIX_PXE=$CLI_NAME/$OUTPUT
OUTPUT_URL=nfs://${SRV_NET_IP}/var/lib/drlm/store/${CLI_NAME}

BACKUP=NETFS
NETFS_PREFIX=BKP
BACKUP_URL=nfs://${SRV_NET_IP}/var/lib/drlm/store/${CLI_NAME}

SSH_ROOT_PASSWORD=drlm

Warning

This file must be readable by Apache

$ chmod 644 /etc/drlm/clients/ReaRCli1.cfg

CentOS 6, Red Hat 6

ReaR requirements for DRLM

As rear is written in bash you need bash as a bare minimum. Other requirements are:

  • mkisofs
  • mingetty (rear is depending on it in recovery mode)
  • syslinux (for i386 based systems)
  • nfs-utils
  • cifs-utils
  • rpcbind
  • wget
  • sudo
  • curl (rear need to get its configuration from DRLM server)
$ yum -y install mkisofs mingetty syslinux nfs-utils cifs-utils rpcbind wget curl sudo
Download and install ReaR

Note

Minimum version required of ReaR: 1.17.0

Download ReaR

$ DISTRO="CentOS_CentOS-6" or DISTRO="RedHat_RHEL-6"

$ wget http://download.opensuse.org/repositories/Archiving:/Backup:/Rear/$DISTRO/$(uname -m)/rear-1.17.2-1.el6.$(uname -m).rpm

You can download other ReaR versions from ReaR Download Page or from OpenSuse Build Service .

Install ReaR package

The RPM based package can be installed as follows

Execute the next command:

$ yum install rear-1.17.2-1.el6.x86_64.rpm

Note

For more information about ReaR visit: http://relax-and-recover.org/documentation

Create DRLM User
$ useradd -d /home/drlm -c "DRLM User Agent" -m -s /bin/bash -p $(echo S3cret | openssl passwd -1 -stdin) drlm
Disable password aging for drlm user
$ chage -I -1 -m 0 -M 99999 -E -1 drlm
Copy rsa key from DRLM Server to the new client

Warning

You have to execute this code from DRLM Server. The password which you will be asked for is “S3cret” and “client_ipaddr” must be changed to the client ip address.

$ ssh-keygen -t rsa
$ ssh-copy-id drlm@"client_ipaddr"
Disable password login
$ passwd -l drlm
Add Sudo roles to DRLM user

Edit /etc/sudoers.d/drlm and add the following lines

Cmnd_Alias DRLM = /usr/sbin/rear*
drlm    ALL=(root)      NOPASSWD: DRLM

Change /etc/sudoers.d/drlm permissions

$ chmod 440 /etc/sudoers.d/drlm
Client configuration

We have to specify that this ReaR client is managed from a DRLM server. We have to edit the /etc/rear/local.conf and insert the next line.

DRLM_MANAGED=y
Services

rpcbind

$ service rpcbind start
$ chkconfig rpcbind on

nfs

$ service nfs start
$ chkconfig nfs on
Add client config file at DRLM SERVER

Warning

You have to do this at DRLM Server.

We have to add a new file called as “client host name”.cfg at /etc/drlm/clients/ For example: If our client host name is ReaRCli1 we have to create /etc/drlm/clients/ReaRCli1.cfg and add the follwing lines. Where CLI_NAME=”Client Host Name” and SRV_NET_IP=”DRLM Server IP”.

CLI_NAME=ReaRCli1
SRV_NET_IP=192.168.1.38

OUTPUT=PXE
OUTPUT_PREFIX=$OUTPUT
OUTPUT_PREFIX_PXE=$CLI_NAME/$OUTPUT
OUTPUT_URL=nfs://${SRV_NET_IP}/var/lib/drlm/store/${CLI_NAME}

BACKUP=NETFS
NETFS_PREFIX=BKP
BACKUP_URL=nfs://${SRV_NET_IP}/var/lib/drlm/store/${CLI_NAME}

SSH_ROOT_PASSWORD=drlm

Warning

This file must be readable by Apache

$ chmod 644 /etc/drlm/clients/ReaRCli1.cfg

DRLM Client Recover

In this section we show how to recover a system which has been backed up.

In this example your client and server has the following configuration. You have to adapt it to your case.

DRLM Server Host Name: DRLMsrv
DRLM Server IP: 192.168.2.120

ReaR Client Host Name: fosdemcli4
ReaR Client IP: 192.168.2.102

Step by Step Client Recover

Reboot the Client and select boot from network. Automaticaly will boot from PXE.

The DRLM server gives us through PXE/TFTP the client boot system. We just have to type “rear” to start the recovery system.

_images/RecoverImage1.jpg

Once we have the system ready Login as “root”. No password required.

_images/RecoverImage2.jpg

We indicate that we want to recover the system with the command “rear recover” and the following variables SERVER=”DRLM Server Ip” REST_OPTS=-k ID=”Rear Client Host Name”, in our case “rear recover SERVER=192.168.2.120 REST_OPTS=-k ID=fosdemcli4”

_images/RecoverImage3.jpg

The system is recovering.

_images/RecoverImage4.jpg

System recovered! So we only have to restart the client.

_images/RecoverImage5.jpg

Development Documentation

Todo

This section will be documented as soon as possible, please be patient. Any question regarding DRLM development, please use DRLM Dev Forum. Thanks!

Command Reference

Network Operations

DRLM can make backups of clients in different networks. So the first step we have to do for the proper functioning of DRLM is register the networks in which later we will register the clients.

DRLM network operations allow us to add, remove, modify and list network of database.

Add Network

This command is used to add networks to DRLM database. It is called like this:

$ drlm addnetwork [options]

The drlm addnetwork has some requiered options:

-n network_name, --netname network_name

Select Network name to add.

-i ip, --ipaddr ip

Network IP address.

-g gateway_ip, --gateway gateway_ip

Network gateway address.

-m network_mask, --mask network_mask

Network mask

-s server_ip, --server server_ip

Network server address.

Examples:

$ drlm addnetwork -i 13.74.90.0 -g 13.74.90.1 -m 255.255.255.0  -s 13.74.90.222 -n vlan12
$ drlm addnetwork -i 13.74.90.0 --gateway 13.74.90.1 --mask 255.255.255.0  --server 13.74.90.222 -n vlan12
$ drlm addnetwork --ipaddr 13.74.90.0 -g 13.74.90.1 -m 255.255.255.0  --server 13.74.90.222 -n vlan12

Optional options:

-h, --help

Show drlm addnetwork help.

Examples:

$ drlm addnetwork -h
$ drlm addnetwork --help

Delete Network

This command is used to delete networks from DRLM database. It is called like this:

$ drlm delnetwork [options]

The drlm delnetwork has some options:

-n network_name, --netname network_name

Select Network to delete by NAME.

Examples:

$ drlm delnetwork -n vlan12
$ drlm delnetwork -name vlan12
-I network_id, --id network_id

Select Network to delete by ID.

Examples:

$ drlm delnetwork -I 12
$ drlm delnetwork --id 12

Optional options:

-h, --help

Show drlm delnetwork help.

Examples:

$ drlm delnetwork -h
$ drlm delnetwork --help

Modify Network

This command is used to modify networks from DRLM database. It is called like this:

$ drlm modnetwork [options]

The drlm modnetwork has some required options:

-n network_name, --netname network_name

Select Network to change by NAME.

-I network_id, --id network_id

Select Network to change by ID.

Optional options:

-i ip, --ipaddr ip

Set new IP address to network.

Examples:

$ drlm modnetwork -I 12 -i 13.74.91.0
$ drlm modnetwork --id 12 --ipaddr 13.74.91.0
$ drlm modnetwork -n vlan12 -i 13.74.91.0
$ drlm modnetwork --netname vlan12 --ipaddr 13.74.91.0
-g gateway_ip, --gateway gateway_ip

Set new GATEWAY address to network.

Examples:

$ drlm modnetwork -I 12 -g 13.74.91.1
$ drlm modnetwork --id 12 --gateway 13.74.91.1
$ drlm modnetwork -n vlan12 -g 13.74.91.1
$ drlm modnetwork --netname vlan12 --gateway 13.74.91.1
-m network_mask, --mask network_mask

Assign new MASK to network.

Examples:

$ drlm modnetwork -I 12 -m 255.255.0.0
$ drlm modnetwork --id 12 -m 255.255.0.0
$ drlm modnetwork -n vlan12 -m 255.255.0.0
$ drlm modnetwork --netname vlan12 --mask 255.255.0.0
-s server_ip, --server server_ip

Assign new SERVER to network.

Examples:

$ drlm modnetwork -I 12 -s 13.74.91.221
$ drlm modnetwork --id 12 --server 13.74.91.221
$ drlm modnetwork -n vlan12 -s 13.74.91.221
$ drlm modnetwork --netname vlan12 --server 13.74.91.221
-h, --help

Show drlm modnetwork help.

Examples:

$ drlm modnetwork -h
$ drlm modnetwork --help

List Networks

This command is used to list the networks from DRLM database. It is called like this:

$ drlm listnetwork [options]

The drlm listnetwork has some options:

-n network_name, --netname network_name

Select Network to list.

Exmples:

$ drlm listnetwork -n vlan12
$ drlm listnetwork --netname vlan12
-A, --all

List all networks.

Examples:

$ drlm listnetwork -A
$ drlm listnetwork -all
-h, --help

Show drlm listnetwork help.

Examples:

$ drlm listnetwork -h
$ drlm listnetwork --help

Client Operations

DRLM client operations allow us to add, remove, modify and list clients of database.

Add Client

This command is used to add clients to DRLM database. It is called like this:

$ drlm addclient [options]

The drlm addclient has some requiered options:

-c client_name, --client client_name

Select Client name to add.

-i ip, --ipaddr ip

Client IP address.

-M mac_address, --macaddr mac_address

Client MAC address.

-n network_name, --netname network_name

Client NETWORK.

Examples:

$ drlm addclient -c clientHost1 -M 00-40-77-DB-33-38 -i 13.74.90.10 -n vlan12
$ drlm addclient --client clientHost1 --macaddr 00-40-77-DB-33-38 -i 13.74.90.10 -n vlan12

Warning

If the network_name doesn’t exist in DRLM database you will get an error. First of all register de network where the client will be registered.

Warning

We have to manualy add to the client configuration file in the DRLM server called /etc/drlm/clients/client_name.cfg with the next content:

OUTPUT=PXE OUTPUT_PREFIX=PXE BACKUP=NETFS NETFS_PREFIX=BKP BACKUP_URL=nfs://SERVER_IP/DRLM/STORE/client_name OUTPUT_URL=nfs://SERVER_IP/DRLM/STORE/client_name OUTPUT_PREFIX_PXE=client_name/$OUTPUT_PREFIX

You have to replace the SERVER_IP for the IP of the DRLM server and the client_name for the client host name.

Optional options:

-h, --help

Show drlm addclient help.

Examples:

$ drlm addclient -h
$ drlm addclient --help

Delete Client

This command is used to delete clients from DRLM database. It is called like this:

$ drlm delclient [options]

The drlm delclient has some requiered options:

-c client_name, --client client_name

Select Client to delete by NAME.

-I client_id, --id client_id

Select Client to delete by ID.

Examples:

$ drlm delclient -c clientHost1
$ drlm delclient --client clientHost1
$ drlm delclient -I 12
$ drlm delclient --id 12

Optional options:

-h, --help

Show drlm delclient help.

Examples:

$ drlm delclient -h
$ drlm delclient --help

Modify Client

This command is used to modify clients from DRLM database. It is called like this:

$ drlm modclient [options]

The drlm modclient has some requiered options:

-c client_name, --client client_name

Select Client to change by NAME

-I client_id, --id client_id

Select Client to change by ID

Optional options:

-i ip, --ipaddr ip

Set new IP address to client.

Examples:

$ drlm modclient -c clientHost1 -i  13.74.90.10
-M mac_address, --macaddr mac_address

Set new MAC address to client.

Examples:

$ drlm modclient -c clientHost1 -M  00-40-77-DB-33-38
$ drlm modclient --client clientHost1 --macaddr  00-40-77-DB-33-38
$ drlm modclient -I 12 --macaddr 00-40-77-DB-33-38
$ drlm modclient --id 12 -M 00-40-77-DB-33-38
-n network_name, --netname network_name

Assign new NETWORK to client.

Examples:

$ drlm modclient -c clientHost1 -n  vlan12
$ drlm modclient --client clientHost1 --netname  vlan12
$ drlm modclient -I 12 --netname vlan12
$ drlm modclient --id 12 -n vlan12
-h, --help

Show drlm modclient help.

Examples:

$ drlm modclient -h
$ drlm modclient --help

List Clients

This command is used to list the clients stored at the database. It is called like this:

$ drlm listclient [options]

The drlm listclient has some options:

-c client_name, --client client_name

Select Client to list.

Examples:

$ drlm listclient -c clientHost1
$ drlm listclient --client clientHost1
-A, --all

List all clients.

Examples:

$ drlm listclient -A
$ drlm listclient --all
-h, --help

Show drlm listclient help.

Examples:

$ drlm listclient -h
$ drlm listclient --help

Backup Operations

DRLM backup operations allow us to remotely create new backups of clients, enable and disable restore points and make listings of backups created among other things.

Run Backup

This command is used to Run remote client backup from DRLM. It is called like this:

$ drlm runbackup [options]

The drlm runbackup has several options:

-c client_name, --client client_name

Select Client to remotely run backup by name.

Examples:

$ drlm runbackup -c clientHost1
$ drlm runbackup --client clientHost1
-I client_id, --id client_id

Select Client to remotely run backup by ID.

Examples:

$ drlm runbackup -I 12
$ drlm runbackup -id 12
-h, --help

Show drlm runbackup help.

Examples:

$drlm runbackup -h
$drlm runbackup --help

Delete Backup

This command is used to delete backups from DRLM database. It is called like this:

$ drlm delbackup [options]

The drlm delbackup has some requiered options:

-c client_name, --client client_name

Select Client to delete the backup.

-I backup_id, --id backup_id

Select Backup to delete by ID.

-A, --all

Delete All backup.

Examples:

$ drlm delbackup -c clientHost1 -I 2015030121245
$ drlm delbackup --client clientHost1 --id 2015030121245
$ drlm delbackup -c clientHost1 -A
$ drlm delbackup --client clientHost1 --all

Optional options:

-h, --help

Show drlm delbackup help.

Examples:

$ drlm delbackup -h
$ drlm delbackup --help

Backup Manager

This command is used to enable or disable clients restore points. Is also used to put a restore point by default. It is called like this:

$ drlm bkpmgr [options]

The drlm bkpmgr has some requiered options:

-c client_name, --client client_name

Select Client name to modify backup

-I backup_id, --id backup_id

Select Backup ID to modify

-e, --enable

Enable Backup

-d, --disable

Disable Backup

Examples:

$drlm bkmgr -c clientHost1 -I 20140519065512 -e
$drlm bkmgr --client clientHost1 -I 20140519065512 -d
$drlm bkmgr -c clientHost1 --id 20140519065512 -e

Aditional options:

-P

Set backup to persistent mode. The persistent mode is used to indicate what backup will be activated by default in case of service restarting. A backup stops to be in persistent mode and it is replaced when creating a new one backup for the same client.

Examples:

$drlm bkmgr -c clientHost1 - I 20140519065512 -e -P
-h, --help

Show drlm bkmgr help.

Examples:

$ drlm bkmgr -h
$ drlm bkmgr --help

List Backups

This command is used to list the backups that we have stored on the server. It is called like this:

$ drlm listbackup [options]

The drlm listbackup has some options:

-c client_name, --client client_name

Select Client to list its backups.

Exampples:

$ drlm listbackup -c clientHost1
$ drlm listbackup --client clientHost1
-A, --all

List all backups

Examples:

$ drlm listbackup -A
$ drlm listbackup --all
-h,--help

Show this help

Examples:

$ drlm listbackup -h
$ drlm listbackup --help

Indexes and tables