echo"[! $(date +'%F %T')] Zabbix dump must have database set to either psql or mysql";
exit 1;
fi;
if[ ! -f "${ZABBIX_DUMP}"];then
echo"[! $(date +'%F %T')] Zabbix dump script could not be found: ${ZABBIX_DUMP}";
exit 1;
fi;
# -i (ignore)/ -f (backup)
if[ ! -z "${ZABBIX_UNKNOWN_TABLES}"];then
OPT_ZABBIX_UNKNOWN_TABLES="-f";
else
OPT_ZABBIX_UNKNOWN_TABLES="-i";
fi;
# Filename
FILENAME="zabbix-config.c.sql";
# backup set:
BACKUP_SET="zabbix-settings-${BACKUP_SET}";
BACKUP_SET_PREFIX="zabbix-settings-";
# borg call
BORG_CALL=$(echo"${_BORG_CALL}"| sed -e "s/##FILENAME##/${FILENAME}/"| sed -e "s|##REPOSITORY##|${REPOSITORY}|"| sed -e "s/##BACKUP_SET##/${BACKUP_SET}/");
BORG_PRUNE=$(echo"${_BORG_PRUNE}"| sed -e "s|##REPOSITORY##|${REPOSITORY}|"| sed -e "s/##BACKUP_SET_PREFIX##/${BACKUP_SET_PREFIX}/");
# if prefix is emtpy remote "-P"
if[ -z "${BACKUP_SET_PREFIX}"];then
BORG_PRUNE=$(echo"${BORG_PRUNE}"| sed -e 's/-P //');