# Copy metricbeat data from one elasticsearch to another on different machines

**URL:** <https://discuss.elastic.co/t/copy-metricbeat-data-from-one-elasticsearch-to-another-on-different-machines/304813>\
**Category:** Logstash\
**Created:** [May 16, 2022, 12:09pm UTC](https://discuss.elastic.co/t/copy-metricbeat-data-from-one-elasticsearch-to-another-on-different-machines/304813 "2022-05-16T12:09:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aviral\_srivastava](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aviral_srivastava/32/98018_2.png) [@aviral\_srivastava](https://discuss.elastic.co/u/aviral_srivastava)\
**Post date:** [May 16, 2022, 12:09pm UTC](https://discuss.elastic.co/t/copy-metricbeat-data-from-one-elasticsearch-to-another-on-different-machines/304813/1 "2022-05-16T12:09:25Z")

</div>

Hi,

source: Elasticsearch-8.1.0  
destination: Elasticsearch-8.1.0

Both the source and destination are on different machines.  
In the source metricbeat indices are created daily.

metricbeat.yml configuration:

```auto
output.elasticsearch.index: "metricbeat-%{+yyyy.MM.dd}"
setup.template.name: "metricbeat"
setup.template.pattern: "metricbeat-*"
setup.template.priority: 500
setup.ilm.enabled: false

```

I need to copy metricbeat data of several days from the above source to destination.  
Below is my logstash configuration:

```auto
input{
	elasticsearch{
		hosts => "<source-ip>:<source-port>"
		user => "elastic"
		password => "4gnn=f0MifrUWJR8Vq_a"
		index => "metricbeat-2022.03.25"
		ssl => true
		ca_file => "C:/Users/avisriva/Downloads/http_ca.crt"
	}
}
output{
	elasticsearch{
		hosts => "https://<destination-ip>:<destination-port>"
		user => "elastic"
		password => "d2L=pxAjFUH*SdL=Qy9b"
		ssl_certificate_verification => false
		index => "metricbeat-2022.03.25"
	}
	stdout{
		codec => rubydebug
	}
}

```

I do not see any error in console being generated. I can see output is generated inside the console. But still no data is copied!!  
Can anybody help??

Also, when I query https://:/\_cat/indices?v  
I can see an index is created with the name: .ds-metricbeat-2022.03.25-2022.05.16-000001 but with 0 documents.

---

<div class="post-metadata">

**Author:** ![aviral\_srivastava](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aviral_srivastava/32/98018_2.png) [@aviral\_srivastava](https://discuss.elastic.co/u/aviral_srivastava)\
**Post date:** [May 20, 2022, 1:12pm UTC](https://discuss.elastic.co/t/copy-metricbeat-data-from-one-elasticsearch-to-another-on-different-machines/304813/2 "2022-05-20T13:12:00Z")

</div>

Can anybody guide here?

---

<div class="post-metadata">

**Author:** ![aviral\_srivastava](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aviral_srivastava/32/98018_2.png) [@aviral\_srivastava](https://discuss.elastic.co/u/aviral_srivastava)\
**Post date:** [May 22, 2022, 9:03am UTC](https://discuss.elastic.co/t/copy-metricbeat-data-from-one-elasticsearch-to-another-on-different-machines/304813/3 "2022-05-22T09:03:00Z")

</div>

Looks, like I have to use

```auto
action => "create"

```

in the output Elasticsearch section. Now it's working.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 19, 2022, 9:04am UTC](https://discuss.elastic.co/t/copy-metricbeat-data-from-one-elasticsearch-to-another-on-different-machines/304813/4 "2022-06-19T09:04:01Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
