]> git.openstreetmap.org Git - chef.git/blob - cookbooks/prometheus/templates/default/backup-data.erb
Add IPv6 addresses to dulcy
[chef.git] / cookbooks / prometheus / templates / default / backup-data.erb
1 #!/bin/sh
2
3 # DO NOT EDIT - This file is being maintained by Chef
4
5 set -e
6
7 SNAPSHOT=$(curl -s -XPOST http://localhost:9090/prometheus/api/v1/admin/tsdb/snapshot | jq -r .data.name)
8
9 /opt/awscli/v2/current/bin/aws --profile osm-prometheus-data-upload s3 sync --storage-class=INTELLIGENT_TIERING --no-progress /var/lib/prometheus/metrics2/snapshots/${SNAPSHOT} s3://openstreetmap-prometheus-data
10
11 rm -rf /var/lib/prometheus/metrics2/snapshots/${SNAPSHOT}