From 96f3120e35da7f017174fb3a92b256ad3494edfb Mon Sep 17 00:00:00 2001 From: Skylar Sadlier Date: Sun, 18 Nov 2018 16:08:07 -0700 Subject: [PATCH 1/2] Update run Fix "unary operator expected" that appears in the first couple lines of the log --- install/etc/s6/services/10-db-backup/run | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/etc/s6/services/10-db-backup/run b/install/etc/s6/services/10-db-backup/run index 8310f1c..f5b4edd 100755 --- a/install/etc/s6/services/10-db-backup/run +++ b/install/etc/s6/services/10-db-backup/run @@ -2,7 +2,7 @@ date >/dev/null -if [ $1 != "NOW" ]; then +if [ "$1" != "NOW" ]; then sleep 10 fi @@ -37,7 +37,7 @@ MD5=${MD5:-TRUE} SPLIT_DB=${SPLIT_DB:-FALSE} TMPDIR=/tmp/backups -if [ $1 = "NOW" ]; then +if [ "$1" = "NOW" ]; then DB_DUMP_BEGIN=+0 MANUAL=TRUE fi @@ -298,4 +298,4 @@ echo '** [db-backup] Initialized at at '$(date) fi done -fi \ No newline at end of file +fi From 5807ba07e32ad018408b35e136ec96283334fe8d Mon Sep 17 00:00:00 2001 From: Skylar Sadlier Date: Sun, 18 Nov 2018 16:09:57 -0700 Subject: [PATCH 2/2] Update run influx command actually doesn't accept a port argument, so instead pass it in as part of the host (to keep a uniform config with the other DB types) --- install/etc/s6/services/10-db-backup/run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/etc/s6/services/10-db-backup/run b/install/etc/s6/services/10-db-backup/run index f5b4edd..86e02fe 100755 --- a/install/etc/s6/services/10-db-backup/run +++ b/install/etc/s6/services/10-db-backup/run @@ -126,7 +126,7 @@ function backup_mysql() { function backup_influx() { for DB in $DB_NAME; do - influxd backup -database $DB -host ${DBHOST} -p ${DBPORT} ${TMPDIR}/${TARGET} + influxd backup -database $DB -host ${DBHOST}:${DBPORT} ${TMPDIR}/${TARGET} generate_md5 compression move_backup