Show host name and module init date in the start info block
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
# start time in seconds
|
||||
START=$(date +'%s');
|
||||
# set init date, or today if not file is set
|
||||
BACKUP_INIT_DATE=$(printf '%(%c)T' $(cat "${BASE_FOLDER}${BACKUP_INIT_CHECK}" 2>/dev/null));
|
||||
# start logging from here
|
||||
exec &> >(tee -a "${LOG}");
|
||||
echo "=== [START : $(date +'%F %T')] ==[${MODULE}]====================================>";
|
||||
@@ -12,8 +14,12 @@ echo "Backup module : ${MODULE}";
|
||||
echo "Module version : ${MODULE_VERSION}";
|
||||
# borg version
|
||||
echo "Borg version : ${BORG_VERSION}";
|
||||
# host name
|
||||
echo "Hostname : ${HOSTNAME}";
|
||||
# show base folder always
|
||||
echo "Base folder : ${BASE_FOLDER}";
|
||||
# Module init date (when init file was writen)
|
||||
echo "Module init date: ${BACKUP_INIT_DATE}";
|
||||
|
||||
# if force check is true set CHECK to 1unless INFO is 1
|
||||
# Needs bash 4.0 at lesat for this
|
||||
|
||||
@@ -30,6 +30,8 @@ _LOG_FOLDER="/var/log/borg.backup/";
|
||||
LOG_FOLDER="";
|
||||
# should be there on everything
|
||||
TEMPDIR="/tmp/";
|
||||
# HOSTNAME (as set on server)
|
||||
HOSTNAME=$(hostname);
|
||||
# creates borg backup based on the include/exclude files
|
||||
# if base borg folder (backup files) does not exist, it will automatically init it
|
||||
# base folder
|
||||
@@ -41,6 +43,7 @@ INCLUDE_FILE="";
|
||||
EXCLUDE_FILE="";
|
||||
# backup folder initialzed check
|
||||
BACKUP_INIT_CHECK="";
|
||||
BACKUP_INIT_DATE="";
|
||||
# one time backup prefix tag, if set will use <tag>.<prefix>-Y-M-DTh:m:s type backup prefix
|
||||
ONE_TIME_TAG="";
|
||||
DELETE_ONE_TIME_TAG="";
|
||||
|
||||
Reference in New Issue
Block a user