1 year ago
#346349
Ajaykumar U
Prometheus Backup and Restore - How to backup and restore metrics data, alerts, servicemonitors/job from old prometheus to new prometheus
I want to export metrics data, alerts, servicemonitors from one prometheus to another prometheus.
- How snapshot backup and restore works as in what all things are backed up (only metrics data (or) servicemonitors/jobs, alerts, metrics is everything backed up)?
- How to restore the snapshot in new prometheus?
- How to verify if the metrics are imported to new prometheus?
- Also is there a way to take backup of alert rules, servicemonitors/jobs and restore it to new prometheus?
Note: Prometheus is deployed using Kube-prometheus-stack/prometheus-operator
Found few posts which suggests to use "snapshot" or "pointing to old PV" methods to backup the prometheus data.
I deleted the previous folder and added my new snapshot folder as suggested in these links - https://suraj.io/post/how-to-backup-and-restore-prometheus/ https://devopstales.github.io/kubernetes/backup-and-retore-prometheus/ But couldn't able to see the restored data in new prometheus.
Tried Pointing my Persistent volume to old PV as mentioned here -https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack/ In this method also i couldn't able to see metrics, servicemonitors/jobs, alerts getting backed up!
backup
prometheus
monitoring
persistent-volumes
prometheus-operator
0 Answers
Your Answer