kamilwu commented on a change in pull request #12167:
URL: https://github.com/apache/beam/pull/12167#discussion_r450716104
##########
File path: .test-infra/metrics/kubernetes/beam-influxdb-autobackup.yaml
##########
@@ -16,35 +16,51 @@
# limitations under the License.
################################################################################
-# A Cron Job that makes a full InfluxDB backup every week.
+# A Cron Job that makes a full InfluxDB backup every week and sends it to
+# GCS bucket.
apiVersion: batch/v1beta1
kind: CronJob
metadata:
labels:
app: beammetrics
name: influxdb-autobackup
spec:
- schedule: "@weekly"
+ schedule: "@daily"
concurrencyPolicy: Forbid
jobTemplate:
spec:
template:
spec:
- containers:
- - image: influxdb:1.8.0
- name: influxdb-autobackup
+ # Using "initContainers" ensures that "create_backups" completes
+ # before "copy-to-gcs-bucket" begins.
+ initContainers:
+ - name: create-backup
+ image: influxdb:1.8.0
args:
- influxd
- backup
- -portable
- -host
- influxdb-rpc:8088
- - /backups
+ - /backup
+ volumeMounts:
+ - mountPath: /backup
+ name: shared-data
+ - name: copy-to-gsc-bucket
+ image: gcr.io/apache-beam-testing/gsutil
Review comment:
Yes, we overwrite the same backup each time, but the bucket has object
versioning enabled. According to the doc:
> You enable Object Versioning for a bucket. Once enabled:
>
> Cloud Storage creates a noncurrent version of an object each time you
perform an overwrite or delete of the live version
If you run `gsutil ls -la gs://apache-beam-testing-metrics`, you will see
all versions of the backup that were created so far.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]