Default Client Configuration

# #############################################################################
# Backup Configuration File for DRLM centralized configuration.               #
#                                                                             #
# This file has been generated by instclient , It can be modified at your     #
# convenience, see https://docs.drlm.org/ or http://relax-and-recover.org/    #
# for more information.                                                       #
#                                                                             #
#         (Configuration examples in /usr/share/drlm/conf/samples/)           #
###############################################################################

# DRLM v2.4.8
#

# DRLM automatically generates a ReaR configuration file in function of three
# variable values, DRLM_BKP_TYPE,  DRLM_BKP_PROT and DRLM_BKP_PROG.
#
# DRLM_BKP_TYPE --> backup type (ISO, ISO_FULL, ISO_FULL_TMP, PXE or DATA)
# DRLM_BKP_PROT --> transport protocol (RSYNC or NETFS)
# DRLM_BKP_PROG --> backup program (RSYNC or TAR)
#
# Backup type ISO generates a rescue image in ISO format and backup data is stored
# in a DRLM server directory.
#
# DRLM_BKP_TYPE=ISO (Default)
#  |-- DRLM_BKP_PROT="RSYNC" (Default)
#  |-- DRLM_BKP_PROT="NETFS"
#       |-- DRLM_BKP_PROG="TAR"
#       |-- DRLM_BKP_PROG="RSYNC"
#
# Backup type ISO_FULL generates a rescue image in ISO format that also contains the data
# Is important to know that the iso image is generated in the client and once done is send
# to DRLM server. For that the client needs to have as mush free space as its own ISO. If
# the client have not enough free space to generate the ISO is possible to user ISO_FULL_TMP
# that generates the ISO image in a NFS temporaly directory of DRLM server.
#
# DRLM_BKP_TYPE=ISO_FULL
#   or
# DRLM_BKP_TYPE=ISO_FULL_TMP:
#
# Backup type PXE generates the PXE files suitable for booting with pxelinux over the network
# and backup data is stored in a DRLM server directory.
#
# DRLM_BKP_TYPE=PXE
#  |-- DRLM_BKP_PROT="RSYNC"
#  |-- DRLM_BKP_PROT="NETFS"
#       |-- DRLM_BKP_PROG="TAR"
#       |-- DRLM_BKP_PROG="RSYNC"
#
# Backup type DATA only does data bakup, it does not generate a rescue image. Backup type DATA
# must be used in conjunction with the parameter BACKUP_PROG_INCLUDE described below and it
# may be useful to use it by enabling incremental backups, DRLM_INCREMENTAL, also described below.
#
# DRLM_BKP_TYPE=DATA
#  |-- DRLM_BKP_PROT="RSYNC" (Default)
#  |-- DRLM_BKP_PROT="NETFS"
#      |-- DRLM_BKP_PROG="TAR"
#      |-- DRLM_BKP_PROG="RSYNC"


# Default backup type, protocol and program
#

#DRLM_BKP_TYPE="ISO"
#DRLM_BKP_PROT="RSYNC"
#DRLM_BKP_PROG="RSYNC"

# SSH_ROOT_PASSWORD defines a password for remote access to the recovery system as 'root' via SSH
# without requiring a public/private key pair. This password is valid only while the recovery system
# is running and will not allow access afterwards to the restored target system.
# In the recovery system the password is stored in hashed MD5 format (do not forget the password).
# Both SSH_ROOT_PASSWORD='plain_text_password' and SSH_ROOT_PASSWORD='hashed_password' are possible.
# To avoid a plain text password in the etc/rear/local.conf config file
# generate a hashed password with the command
#   echo 'my_recovery_system_root_password' | openssl passwd -1 -stdin
# and use the output of openssl to set SSH_ROOT_PASSWORD='output_of_openssl'
# (single quotes avoid issues with the special bash character $ in the openssl output).
# SSH_ROOT_PASSWORD is ignored when SSH_FILES is set to a 'false' value.
#
#SSH_ROOT_PASSWORD='drlm'

##################################
# Additional DRLM Configurations #
##################################

# ================================
# ==== History Backup files ======
# ================================

# Max numbers of backups for client backup configration to keep in filesystem
#
#HISTBKPMAX=2

# ================================
# ===== Incremental Backups ======
# ================================

# DRLM_INCREMENTAL by defautl incremental backups are disabled. Put
# this var to "yes" in order to enable
#
#DRLM_INCREMENTAL="yes"

# DRLM_INCREMENTAL_HIST defines how many snaps to save
#
#DRLM_INCREMENTAL_HIST=6

# DRLM_INCREMENTAL_BEHAVIOR
# 0 - Always incremental. When DRLM_INCREMENTAL_HIST is exceeded deletes the oldest snap. HISTBKPMAX is ignored.
# 1 - New and empty DR File. When DRLM_INCREMENTAL_HIST is exceeded makes a New and empty DR File before runbackup
# 2 - New inherited DR File. When DRLM_INCREMENTAL_HIST is exceeded makes a New DR File from last backup.
#
#DRLM_INCREMENTAL_BEHAVIOR=1

# ================================
# ======= Pretty Options =========
# ================================

# Backups of less than BACKUP_SIZE_STATUS_FAILED in megabytes will show in red color in list backups
#
#BACKUP_SIZE_STATUS_FAILED=200

# Backups of less than BACKUP_SIZE_STATUS_WARNING in megabytes will show in orange color in list backups
#
#BACKUP_SIZE_STATUS_WARNING=800

# Backups that take less than BACKUP_TIME_STATUS_FAILED in seconds will show in red color in list backups
#
#BACKUP_TIME_STATUS_FAILED="60"

# Backups that take less than BACKUP_TIME_STATUS_WARNING in secods will show in orange color in list backups
#
#BACKUP_TIME_STATUS_WARNING="120"


##################################
# Additional ReaR Configurations #
##################################

# ================================
# ========== Data Only ===========
# ================================

# When DRLM_BKP_TYPE is set to 'DATA' value
# only what is specified in BACKUP_PROG_INCLUDE will be in the backup
# but not implicitly also all local filesystems as defined in mountpoint_device:
#
# BACKUP_PROG_INCLUDE=( '/home' )

# ================================
# ========= Exclusions ===========
# ================================

# Exclude LVM2 volume groups. This will automatically exclude also the creation of the
# corresponding physical and logical volumes that belong to the excluded volume group.
# You must also exclude the corresponding mountpoints in EXCLUDE_MOUNTPOINTS (see above)
# otherwise "rear recover" would try to recreate the filesystems onto non-existing LVs.
#
# EXCLUDE_VG=( 'Volume_Grup1' 'Volume_Grup2' )

# Exclude filesystems by specifying their mountpoints. Will be automatically added to the
# $BACKUP_PROG_EXCLUDE array during backup to prevent the excluded filesystems' data to
# be backed up
#
# EXCLUDE_MOUNTPOINTS=( '/Mount_Point1' '/Mount_Point2' )

# BACKUP_PROG_EXCLUDE is an array of strings that get written into a backup-exclude.txt file
# that is used e.g. in 'tar -X backup-exclude.txt' to get things excluded from the backup.
# Proper quoting of the BACKUP_PROG_EXCLUDE array members is crucial to avoid bash expansions.
# In /etc/rear/local.conf use BACKUP_PROG_EXCLUDE+=( '/this/*' '/that/*' )
# to specify your particular items that should be excluded from the backup in addition to what
# gets excluded from the backup by default here (see also BACKUP_ONLY_EXCLUDE below):
#
# BACKUP_PROG_EXCLUDE+=( '/backup*' '/var/lib/rear/*' '/dev/vx/*' '/dev/dmpconfig/*' '/dev/dmpconfig' '/dev/vx/dmpconfig' )

# When BACKUP_ONLY_EXCLUDE is set to a 'true' value
# only what is specified in BACKUP_PROG_EXCLUDE will be excluded from the backup
# but not implicitly also all excluded mountpoints in EXCLUDE_MOUNTPOINTS:
#
# BACKUP_ONLY_EXCLUDE="no"

# ================================
# ========= Inclusions ===========
# ================================

# Only include LVM2 volume groups - the opposite of EXCLUDE_VG (handy if you only want vg00 to be included)
# EXCLUDE_VG and EXCLUDE_MOUNTPOINTS will get populated automatically, if needed
# syntax : e.g. ONLY_INCLUDE_VG=( "vg00" "vg01" )
#
# ONLY_INCLUDE_VG=( 'Volume_Grup1' 'Volume_Grup2' )


# ================================
# ======== Custom Scripts ========
# ================================

# NOTE: The scripts can be defined as an array to better handly spaces in parameters.
# The scripts are called like this: eval "${PRE_RECOVERY_SCRIPT[@]}"

# Call this after Relax-and-Recover did everything in the recover workflow.
# Use $TARGET_FS_ROOT (by default '/mnt/local') to refer to the recovered system.
#
#POST_RECOVERY_SCRIPT=

# Call this before Relax-and-Recover starts to do anything in the recover workflow. You have the rescue system but nothing else
#
#PRE_RECOVERY_SCRIPT=

# PRE/POST Backup scripts will provide the ability to run certain tasks before and after a ReaR backup.
# for example:
#   If a small database running on local filesystem and dependent on a local service, you will maintain its data consistency.
#   Stopping it before backup and restarting again after.
#   In case of any error during backup, if POST tasks were defined, ReaR will run those POST tasks within ExitTasks Array.
#   This will prevent that the database remain stopped.

# Call this after Relax-and-Recover finished to do anything in the mkbackup/mkbackuponly workflow.
#
#POST_BACKUP_SCRIPT=

# Call this before Relax-and-Recover starts to do anything in the mkbackup/mkbackuponly workflow.
#
#PRE_BACKUP_SCRIPT=


# ================================
# ======== Boot Over SAN =========
# ================================

# Use this setup if your client boot disks are not internal but in a SAN/Disk Cabinet.

#AUTOEXCLUDE_MULTIPATH=n
#BOOT_OVER_SAN=y
#MODULES=( ${MODULES[@]} dm-multipath )
#MODULES_LOAD=( ${MODULES_LOAD[@]} dm-multipath )


# ================================
# ======= SLES with BTRFS ========
# ================================

# NOTE: This config was tested and works for latest SLE12 and SLE15 systems with default BTRFS layouts.
#       Check carefully your BTRFS layout, as SUSE changed it on each SP iteration since they relaesed it
#       first time in SLES11 until they met the actual layout. If your systems were upgraded from thesie early
#       versions with BTRFS check your layout properly to adjust the configuration for a success recover.

#REQUIRED_PROGS=( ${REQUIRED_PROGS[@]} 'snapper' 'chattr' 'lsattr' )
#COPY_AS_IS=( ${COPY_AS_IS[@]} '/usr/lib/snapper/installation-helper' '/etc/snapper/config-templates/default' )
#BACKUP_PROG_INCLUDE=( '/' )
#BACKUP_PROG_EXCLUDE=( '/.snapshots' )
#POST_RECOVERY_SCRIPT=( 'if snapper --no-dbus -r $TARGET_FS_ROOT get-config | grep -q "^QGROUP.*[0-9]/[0-9]" ; then snapper --no-dbus -r $TARGET_FS_ROOT set-config QGROUP= ; snapper --no-dbus -r $TARGET_FS_ROOT setup-quota && echo snapper setup-quota done || echo snapper setup-quota failed ; else echo snapper setup-quota not used ; fi' )


# =======================================
# ======= Complex Network setups ========
# =======================================

# If you have complex network setups on your systems you may need to setup your network in recovery before starting the recover process.
# This is an example of a system with vlan tagging. Check if your HW vendor supports this kind of setup in UEFI to be able to
# set a default VLAN ID in a NIC for bootingi when tagging/trunk is enabled.
# Here the example to auto conrfigure the complex setup in recovery:
#   VLAN ID of DRLM network: 2011
#   DRLM Client IP address: 192.168.0.10/24
#   Network Interface Card: eno50

#NETWORKING_PREPARATION_COMMANDS=( 'modprobe 8021q' 'ip link add link eno50 name eno50.2011 type vlan id 2011' 'ip link set dev eno50 up' 'ip link set dev eno50.2011 up' 'ip addr add 192.168.0.10/24 brd 192.168.0.255 dev eno50.2011' 'return' )