# Trying to understand where Prometheus store data

**URL:** <https://discuss.prometheus.io/t/trying-to-understand-where-prometheus-store-data/3339>\
**Category:** General Help/Support\
**Created:** [March 15, 2025, 4:18am UTC](https://discuss.prometheus.io/t/trying-to-understand-where-prometheus-store-data/3339 "2025-03-15T04:18:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![simtcrom](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.prometheus.io/simtcrom/32/1139_2.png) [@simtcrom](https://discuss.prometheus.io/u/simtcrom)\
**Post date:** [March 15, 2025, 4:18am UTC](https://discuss.prometheus.io/t/trying-to-understand-where-prometheus-store-data/3339/1 "2025-03-15T04:18:25Z")

</div>

Hello,

I have Prometheus configured and running on a raspberry pi 5 as below,

```auto
global:
  scrape_interval: 1s
  evaluation_interval: 1s
scrape_configs:
  - job_name: "node"
    static_configs:
      - targets: ["server:9100"]

```

and starting it as,

```auto
/usr/local/bin/prometheus --config.file=/etc/prometheus/prometheus.yml --storage.tsdb.retention.time=365d

```

As you can see I had missed to include `--storage.tsdb.path`.  
Where would be currently Prometheus store the data?

Thanks.

---

<div class="post-metadata">

**Author:** ![simtcrom](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.prometheus.io/simtcrom/32/1139_2.png) [@simtcrom](https://discuss.prometheus.io/u/simtcrom)\
**Post date:** [March 15, 2025, 4:29am UTC](https://discuss.prometheus.io/t/trying-to-understand-where-prometheus-store-data/3339/2 "2025-03-15T04:29:01Z")

</div>

I found that its going to /data folder.

Now If I want to move it to another folder by `--storage.tsdb.path=/your/custom/path` and restart Prometheus, will existing stuff in /data also get migrated over to /your/custom/path ?

---

<div class="post-metadata">

**Author:** ![NodeLife](https://avatars.discourse-cdn.com/v4/letter/n/c0e974/32.png) [@NodeLife](https://discuss.prometheus.io/u/NodeLife)\
**Post date:** [March 15, 2025, 10:43am UTC](https://discuss.prometheus.io/t/trying-to-understand-where-prometheus-store-data/3339/3 "2025-03-15T10:43:17Z")

</div>

> **[Configuration | Prometheus](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#:~:text=Prometheus%20is%20configured%20via%20command,reload%20any%20configured%20rule%20files)**
>
> An open-source monitoring system with a dimensional data model, flexible query language, efficient time series database and modern alerting approach.

Maybe help

---

<div class="post-metadata">

**Author:** ![hlxdevops](https://avatars.discourse-cdn.com/v4/letter/h/bbce88/32.png) [@hlxdevops](https://discuss.prometheus.io/u/hlxdevops)\
**Post date:** [March 31, 2025, 2:21pm UTC](https://discuss.prometheus.io/t/trying-to-understand-where-prometheus-store-data/3339/4 "2025-03-31T14:21:11Z")

</div>

I think the data will not be migrated and you will need to manually copy it over to the new location (at least).

---

<div class="post-metadata">

**Author:** ![simtcrom](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.prometheus.io/simtcrom/32/1139_2.png) [@simtcrom](https://discuss.prometheus.io/u/simtcrom)\
**Post date:** [April 11, 2025, 3:40am UTC](https://discuss.prometheus.io/t/trying-to-understand-where-prometheus-store-data/3339/5 "2025-04-11T03:40:45Z")

</div>

I did below to migrate the data.

```auto
sudo systemctl stop prometheus
sudo rsync -av /data/ /mnt/nas/data/

```

added flag `--storage.tsdb.path=/mnt/nas/data` to startup config

```auto
sudo systemctl restart prometheus

```

and all my old data is still available in Prometheus.
