##################################################################
# SaraB related configuration options                            #
##################################################################

# Directory where SaraB configuration files are located
# Default="/usr/pkg/etc/sarab/"
SARAB_ETC="/usr/pkg/etc/sarab/"

# Name of the Dar configuration file to be used (must be located under SARAB_ETC)
# Default="sarab.dcf"
SARAB_DCF="sarab.dcf"

# Name of the rotation.schedule to be used (must be located under SARAB_ETC)
# Default="rotation.schedule"
ROTATION_SCHEDULE="rotation.schedule"

# Root directory where backups will be created and stored 
# Note: Use the rotation.schedule file to specify the names of virtual tapes
# Default="/mnt/backup/"
DESTINATION="/mnt/backup/"

# Send email notices when a backup job completes successfully?
# Choose "yes" or "no"
# Default="no"
EMAIL_SUCCESS="yes"

# Send email notices when a backup job fails or has problems?
# Choose "yes" or "no"
# Default="yes"
EMAIL_FAILURE="yes"

# The email address that will receive notices (see above)
EMAIL_ADDRESS="root@$HOSTNAME"

# Should SaraB include the statically-compiled DAR executable file with every archive?
# This file can be used to restore the archive on any system.  (Size: ~1 MB)
# Choose "yes" or "no"
# Default="yes"
COPY_DAR="no"

# Test each archive for errors immediately after creating it?  Uses a 16-bit CRC check.
# SaraB will display a notification and exit if any errors are found.  If an error is found,
# the corrupted backup will be located in the working directory, and the rotation.schedule
# file will not be rotated.
# Choose "yes" or "no"
# Default="yes"
TEST_ARCHIVE="yes"

# The name and location of the log file that SaraB should use
# Default="var/log/sarab.log"
LOG_FILE="/var/log/sarab.log"

# Verbose output from SaraB.
# Note: This is different than setting --verbose in sarab.dcf, which creates verbose output from Dar.
# Default="no"
SARAB_VERBOSE="no"

# If you want your backups to be encrypted, use SARAB_KEY to specify cipher and key phrase.
# It will be passed on to dar using the --key and --keyref parameters as needed.
#SARAB_KEY="bf:my_blowfish_password"

##################################################################
# DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING #
##################################################################

# Remove trailing-slashes from variables
SARAB_ETC=$(echo $SARAB_ETC | sed -e 's/\/*$//')
DESTINATION=$(echo $DESTINATION | sed -e 's/\/*$//')

# Use this file for security sensitive dar configuration (encryption ciphers)
SECURITY_CONFIG=$SARAB_ETC/sarab.dcf.secure

# Get the date and time with custom formating; used as the basename for the DAR file
# For more information on the date command, type "man date" at the command prompt.
BASENAME="$(date +'%m-%d-%Y_%H%M')"

# The location of the DAR executable file
# This line is only effective if not added by install.sh later in this file
DAR_BINARY="/usr/pkg/bin/dar"

# The location of the statically-compiled DAR executable file
DAR_STATIC="/usr/pkg/bin/dar_static"

# The temporary directory name that backups will be created in. This will be created underneath $DESTINATION.
WORK_DIR=".sarab_temp_workdir"

# The temporary location where the archive is created, including the basename of the file
DAR_CREATE="$DESTINATION/$WORK_DIR/$BASENAME"

# Location and name of temporary log file
TEMP_LOG="$SARAB_ETC/sarab_temp.log"
