# Backup pmm server data

**URL:** https://forums.percona.com/t/backup-pmm-server-data/10085
**Category:** Database Monitoring and Management
**Created:** [April 14, 2021, 7:11am UTC](https://forums.percona.com/t/backup-pmm-server-data/10085 "2021-04-14T07:11:33Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![C80SGEEK](https://avatars.discourse-cdn.com/v4/letter/c/c77e96/32.png) [@C80SGEEK](https://forums.percona.com/u/C80SGEEK)
#### Post date: [April 14, 2021, 7:11am UTC](https://forums.percona.com/t/backup-pmm-server-data/10085/1 "2021-04-14T07:11:33Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Vadim\_Yalovets](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/vadim_yalovets/32/43_2.png) [@Vadim\_Yalovets](https://forums.percona.com/u/Vadim_Yalovets)
#### Post date: [April 14, 2021, 10:36am UTC](https://forums.percona.com/t/backup-pmm-server-data/10085/2 "2021-04-14T10:36:34Z")

</div>

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 [https://victoriametrics.github.io/vmbackup.html](https://victoriametrics.github.io/vmbackup.html)

---

<div class="post-metadata">

### Author: ![C80SGEEK](https://avatars.discourse-cdn.com/v4/letter/c/c77e96/32.png) [@C80SGEEK](https://forums.percona.com/u/C80SGEEK)
#### Post date: [April 15, 2021, 6:36am UTC](https://forums.percona.com/t/backup-pmm-server-data/10085/3 "2021-04-15T06:36:15Z")

</div>

Hi adivinho,

I’am using PMM v1.3.2, i do have a mount point /srv witch contains 🙂  
/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

---

<div class="post-metadata">

### Author: ![Vadim\_Yalovets](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/vadim_yalovets/32/43_2.png) [@Vadim\_Yalovets](https://forums.percona.com/u/Vadim_Yalovets)
#### Post date: [April 15, 2021, 10:00am UTC](https://forums.percona.com/t/backup-pmm-server-data/10085/4 "2021-04-15T10:00:51Z")

</div>

> [@C80SGEEK](#):
>
> I’am using PMM v1.3.2, i do have a mount point /srv witch contains 🙂  
> /srv/consul, /srv/mysql, /srv/prometheus, /srv/update, /srv/grafana, /srv/ngix, /srv/prometheusarchived\_fingerprint\_to\_metric.

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

> [@C80SGEEK](#):
>
> 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.

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

---

<div class="post-metadata">

### Author: ![C80SGEEK](https://avatars.discourse-cdn.com/v4/letter/c/c77e96/32.png) [@C80SGEEK](https://forums.percona.com/u/C80SGEEK)
#### Post date: [April 15, 2021, 10:44am UTC](https://forums.percona.com/t/backup-pmm-server-data/10085/5 "2021-04-15T10:44:49Z")

</div>

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,

---

<div class="post-metadata">

### Author: ![Vadim\_Yalovets](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/vadim_yalovets/32/43_2.png) [@Vadim\_Yalovets](https://forums.percona.com/u/Vadim_Yalovets)
#### Post date: [April 16, 2021, 8:12am UTC](https://forums.percona.com/t/backup-pmm-server-data/10085/6 "2021-04-16T08:12:11Z")

</div>

> [@C80SGEEK](#):
>
> 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 ?

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.

> [@C80SGEEK](#):
>
> 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

> **[Percona legacy documentation](https://docs.percona.com/legacy-documentation/)**
>
> You should upgrade to the most recent version for documentation support. The documentation for product versions that are either outdated or have reached their end-of-life is available in a PDF format. Outdated documentation is defined as the...
