# Sync with a DB

**URL:** <https://discuss.elastic.co/t/sync-with-a-db/7153>\
**Category:** Elasticsearch\
**Created:** [March 27, 2012, 10:16pm UTC](https://discuss.elastic.co/t/sync-with-a-db/7153 "2012-03-27T22:16:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adam\_Estrada](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adam_estrada/32/2704_2.png) [@Adam\_Estrada](https://discuss.elastic.co/u/Adam_Estrada)\
**Post date:** [March 27, 2012, 10:16pm UTC](https://discuss.elastic.co/t/sync-with-a-db/7153/1 "2012-03-27T22:16:06Z")

</div>

All,

I have traditionally, gone from a RDBMS to ES. Now, I am using one of the  
\_rivers and would like to go the other direction. I would like to create a  
service that basically listens for new content to insert in to the index  
and then replicate it in to Postgresql. I have my reasons why I have to do  
this. Anyway, has anyone taken a stab at this before? Can you share your  
experience and/or code with me?

Thanks,  
Adam

---

<div class="post-metadata">

**Author:** ![Thomas\_Peuss](https://avatars.discourse-cdn.com/v4/letter/t/22d042/32.png) [@Thomas\_Peuss](https://discuss.elastic.co/u/Thomas_Peuss)\
**Post date:** [March 28, 2012, 7:04am UTC](https://discuss.elastic.co/t/sync-with-a-db/7153/2 "2012-03-28T07:04:45Z")

</div>

Hi Adam!

Am Mittwoch, 28. März 2012 00:16:06 UTC+2 schrieb Adam Estrada:

> All,
> 
> I have traditionally, gone from a RDBMS to ES. Now, I am using one of the  
> \_rivers and would like to go the other direction. I would like to create a  
> service that basically listens for new content to insert in to the index  
> and then replicate it in to Postgresql. I have my reasons why I have to do  
> this. Anyway, has anyone taken a stab at this before? Can you share your  
> experience and/or code with me?

I am working on a plugin  
([GitHub - derryx/elasticsearch-changes-plugin: An Elasticsearch Plugin that notifies about changes to indices](https://github.com/derryx/elasticsearch-changes-plugin)) that provides that  
type of information. It is not finished yet. But you might get an idea how  
to extract that type of information. We use a similar approach to feed  
information into a CEP (complex event processing) system.

CU  
Thomas

---

<div class="post-metadata">

**Author:** ![Adam\_Estrada](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adam_estrada/32/2704_2.png) [@Adam\_Estrada](https://discuss.elastic.co/u/Adam_Estrada)\
**Post date:** [March 28, 2012, 1:11pm UTC](https://discuss.elastic.co/t/sync-with-a-db/7153/3 "2012-03-28T13:11:57Z")

</div>

Brilliant! This is exactly what I had in mind! We'll take a look at it and  
get back to you with any feedback we might have.

Adam

On Wed, Mar 28, 2012 at 3:04 AM, Thomas Peuss [thomas.peuss@nterra.com](mailto:thomas.peuss@nterra.com)wrote:

> Hi Adam!
> 
> Am Mittwoch, 28. März 2012 00:16:06 UTC+2 schrieb Adam Estrada:
> 
> > All,
> > 
> > I have traditionally, gone from a RDBMS to ES. Now, I am using one of the  
> > \_rivers and would like to go the other direction. I would like to create a  
> > service that basically listens for new content to insert in to the index  
> > and then replicate it in to Postgresql. I have my reasons why I have to do  
> > this. Anyway, has anyone taken a stab at this before? Can you share your  
> > experience and/or code with me?
> 
> I am working on a plugin (  
> [GitHub - derryx/elasticsearch-changes-plugin: An Elasticsearch Plugin that notifies about changes to indices](https://github.com/derryx/elasticsearch-changes-plugin)) that provides  
> that type of information. It is not finished yet. But you might get an idea  
> how to extract that type of information. We use a similar approach to feed  
> information into a CEP (complex event processing) system.
> 
> CU  
> Thomas

---

<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:** [July 6, 2017, 3:34am UTC](https://discuss.elastic.co/t/sync-with-a-db/7153/4 "2017-07-06T03:34:20Z")

</div>


