Skip to content

Instantly share code, notes, and snippets.

View franck-grenier's full-sized avatar

Franck Grenier franck-grenier

View GitHub Profile
@schnapster
schnapster / prometheus_b2_backup.sh
Last active June 23, 2024 16:35
Backup Prometheus v2.1+ snapshots to b2 backblaze. Requires b2, curl, jq, tar
#!/bin/bash
#
# Prerequisites:
# sudo apt install pipx curl jq tar
# sudo pipx install b2
#
# Enabled admin api in your prometheus, see: https://prometheus.io/docs/prometheus/2.1/querying/api/#tsdb-admin-apis
#
# pass 6 args:
# - prometheus base url, example: http://localhost:9090