Merge ~pjdc/influxdb-charm/+git/influxdb-charm:back-up-with-ancient-clients into influxdb-charm:master

Proposed by Paul Collins
Status: Merged
Approved by: Haw Loeung
Approved revision: e37e4cefcc2377268faa08f3859b896d208e371f
Merged at revision: 054f30aad7e3cc79cc6809b8e0241c07018dca31
Proposed branch: ~pjdc/influxdb-charm/+git/influxdb-charm:back-up-with-ancient-clients
Merge into: influxdb-charm:master
Diff against target: 26 lines (+14/-1)
1 file modified
templates/influxdb-backup (+14/-1)
Reviewer Review Type Date Requested Status
Haw Loeung Approve
Review via email: mp+335348@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Haw Loeung (hloeung) wrote :

LGTM, +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/templates/influxdb-backup b/templates/influxdb-backup
index cb53a44..cd3fabf 100644
--- a/templates/influxdb-backup
+++ b/templates/influxdb-backup
@@ -17,7 +17,20 @@ if [ -r /root/.influx-auth ]; then
17 export INFLUX_USERNAME INFLUX_PASSWORD17 export INFLUX_USERNAME INFLUX_PASSWORD
18fi18fi
1919
20DATABASES=$(influx --execute 'show databases' --format=json | jq --raw-output '.results[0].series[0].values[][0]' | grep -ve '^_internal$')20# Leak credentials only when necessary. Support
21# for the environment variables was added in
22# version 1.1.0. Note that earlier versions of the
23# shell display their version differently.
24auth_args=""
25case $(influx -version) in
26 "InfluxDB shell version: 1.0."*|"InfluxDB shell 0."*)
27 auth_args="-username ${INFLUX_USERNAME} -password ${INFLUX_PASSWORD}"
28 ;;
29 *)
30 ;;
31esac
32
33DATABASES=$(influx ${auth_args} --execute 'show databases' --format=json | jq --raw-output '.results[0].series[0].values[][0]' | grep -ve '^_internal$')
2134
22# back up metadata35# back up metadata
23influxd backup $TODAY_DIR/metdata36influxd backup $TODAY_DIR/metdata

Subscribers

People subscribed via source and target branches

to all changes: