Backup pmm server data

Hello,

I’m using Pmm server from the appliance OVA, on Vmware.

My question is, what is the best practice regarding backups ?

I want to backup my metrics data. I Goolge a lot arround but did not find any hint.

any help would be apreciated, Regards

Hi De Jong,

PMM2 data is stored under /srv folder (changed from PMM1, which stored data in other directories
/opt/prometheus/data, /opt/consul-data, /var/lib/mysql)
So you may just backup /srv/victoriametrics folder that is used by VictoriaMetrics for collecting time series.

Also you may take a look at a VM tool for creating snapshots vmbackup · VictoriaMetrics

1 Like

Hi adivinho,

I’am using PMM v1.3.2, i do have a mount point /srv witch contains :slight_smile:
/srv/consul, /srv/mysql, /srv/prometheus, /srv/update, /srv/grafana, /srv/ngix, /srv/prometheusarchived_fingerprint_to_metric.

I guess that the metrics data is stored by prometheus as levedb witch is compliant to backup over btrfs snapshots

butt on the same disk there are alos mysql data witch semms to contain the host and agent configurations, but mysql is not 100% compliant witch btrfs snapshot backup methode.

is There a documentation out there that explains what data is stored where and under what format ?

I have tried VMBackup (snapshot) but the Mysql database was not properly backuped by this process (tablespace allocation problesm) that where not recoverable even whit innodb recover mode 6.

I wondered that i did not find any information regarding reliable backup strategies for pmm server by percona, What is the official possition for backp strategie on pmm server ?

Kind regards

1 Like

Yes the folder /srv is present but prometheus is run with next flag
--storage.local.path=/opt/prometheus/data
So /opt/prometheus/data is the correct folder for backup.

Also an API endpoint to take snapshots was added in Prometheus 2.1 but an older version is used in PMM 1.3.2

Data is stored in “pmm” DB. So you may use the mysqldump client utility for creating a dump of the database.

1 Like

Hi,

Thanks for replys

Yes the folder /srv is present but prometheus is run with next flag
--storage.local.path=/opt/prometheus/data
So /opt/prometheus/data is the correct folder for backup.

My /opt is empty,
regarding the console metrics should be stored at : /srv/grafana

regarding prometheus .yml :
metrics_path: /prometheus/metrics
services: [‘linux:metrics’]

so if i right understand grafana expose data to prometheus and prometheus store this data on levedb
on my server data semmes to be present in /srv/prometheus.

Data is stored in “pmm” DB. So you may use the mysqldump client utility for creating a dump of the database.

So if i right understand, to backup my metrics data i need a dump of pmm database and a backup from /srv/prometheus folder do i need to backup grafana folder ?

Is there some doc that explains the architecture and the storage solutions of eatch componnent of pmm server so that i can setup a appropriated backup solution

Kind regards,

1 Like

Metrics are stored by Prometheus. It’s /srv/prometheus folder for PMM Server in a virtual machine.
PMM configuration data is stored in mysql (“pmm” database).

There is no reason to backup grafana folder.

https://www.percona.com/doc/percona-monitoring-and-management/1.x/architecture.html