# Copying data between measurements in different databases

**URL:** <https://community.influxdata.com/t/copying-data-between-measurements-in-different-databases/29502>\
**Category:** Systems\
**Created:** [April 14, 2023, 5:01pm UTC](https://community.influxdata.com/t/copying-data-between-measurements-in-different-databases/29502 "2023-04-14T17:01:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexander\_Var](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/alexander_var/32/4357_2.png) [@Alexander\_Var](https://community.influxdata.com/u/Alexander_Var)\
**Post date:** [April 14, 2023, 5:01pm UTC](https://community.influxdata.com/t/copying-data-between-measurements-in-different-databases/29502/1 "2023-04-14T17:01:18Z")

</div>

Dear all,

I am new to using InfluxDB and apologize for my limited knowledge.

I have a database A with a certain number of measurements in it, and I want to copy one of these measurements in its entirety to database B.

What command should I use?

Please note that both database A and B are on localhost, but they are under different retention policies

Thanks

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [April 17, 2023, 11:22pm UTC](https://community.influxdata.com/t/copying-data-between-measurements-in-different-databases/29502/2 "2023-04-17T23:22:32Z")

</div>

Hello @Alexander_Var,  
There isn’t a single command. How much data is in DB A?  
Are you looking to continuously copy data?

If you’re looking to continuously copy data try:

> **[InfluxDB Edge Data Replication | InfluxData](https://www.influxdata.com/products/influxdb-edge-data-replication/)**
>
> Process data at the edge and automatically replicate it to the cloud in a durable, reliable way using InfluxDB Edge Data Replication.

If its a small amount of data you can query it with a client library and write it back to a new DB B.

---

<div class="post-metadata">

**Author:** ![Alexander\_Var](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/alexander_var/32/4357_2.png) [@Alexander\_Var](https://community.influxdata.com/u/Alexander_Var)\
**Post date:** [July 26, 2023, 5:04pm UTC](https://community.influxdata.com/t/copying-data-between-measurements-in-different-databases/29502/3 "2023-07-26T17:04:37Z")

</div>

> [@Anaisdg](#):
>
> Hello @Alexander_Var,  
> There isn’t a single command. How much data is in DB A?  
> Are you looking to continuously copy data?
> 
> If you’re looking to continuously copy data try:

Hello, thank you very much for your answer.

I need to migrate data from Influx 1.x to 2.7 only once.
