# Migrate configuration - Mongodb and Content Pack

**URL:** https://community.graylog.org/t/migrate-configuration-mongodb-and-content-pack/7999
**Category:** Graylog Central (peer support)
**Created:** [December 12, 2018, 2:15pm UTC](https://community.graylog.org/t/migrate-configuration-mongodb-and-content-pack/7999 "2018-12-12T14:15:31Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![monchito](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/monchito/32/3372_2.png) [@monchito](https://community.graylog.org/u/monchito)
#### Post date: [December 12, 2018, 2:15pm UTC](https://community.graylog.org/t/migrate-configuration-mongodb-and-content-pack/7999/1 "2018-12-12T14:15:31Z")

</div>

Hi all, following this post [Migrate configuration or Upgrade?](https://community.graylog.org/t/migrate-configuration-or-upgrade/7781/3)  
i got a clear installation of Graylog 2.4

In order to migrate configuration from Graylog 2.0 to Graylog 2.4 i got stuck on migrate mongo Database.

**root@graylog:~# sudo mongodump -h 127.0.0.1 -d graylog -o /home/ubuntu**  
**connected to: 127.0.0.1**  
**Wed Dec 12 13:03:24.023 DATABASE: graylog to /home/ubuntu/graylog**  
**root@graylog:~# ls /home/ubuntu/**

/home/ubuntu/ is empty (note that i try also using root user)

Also check mongodb vs mongodump version  
 ![imagen](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/2X/c/cf6a38147c4b3b496cd716a02e84169b9c236fd1.png)

Any ideas? thanks!

---

<div class="post-metadata">

### Author: ![monchito](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/monchito/32/3372_2.png) [@monchito](https://community.graylog.org/u/monchito)
#### Post date: [December 13, 2018, 12:05pm UTC](https://community.graylog.org/t/migrate-configuration-mongodb-and-content-pack/7999/2 "2018-12-13T12:05:31Z")

</div>

Hi again, in old graylog (v2.0 OVA)

I run this commands:

 ![imagen](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/2X/e/e5805207abadb235cf78a49a05622fced25a7231.png)  
(WARNING: Insecure configuration, access control is not enabled .)

I don’t understand why i can’t see tables.

Same commands on the new graylog 2.4, mongodb v3.6.9 :  
 ![imagen](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/2X/3/3ee1a558f67c54b2e37163c6e92397de214adee1.png)

Any help will be appreciated, thanks!

---

<div class="post-metadata">

### Author: ![Totally\_Not\_A\_Robot](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/totally_not_a_robot/32/3353_2.png) [@Totally\_Not\_A\_Robot](https://community.graylog.org/u/Totally_Not_A_Robot)
#### Post date: [December 13, 2018, 1:45pm UTC](https://community.graylog.org/t/migrate-configuration-mongodb-and-content-pack/7999/3 "2018-12-13T13:45:21Z")

</div>

I see that you connected without authenticating.

@jan, does the Graylog OVA not use an application account for Graylog in MongoDB?

---

<div class="post-metadata">

### Author: ![monchito](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/monchito/32/3372_2.png) [@monchito](https://community.graylog.org/u/monchito)
#### Post date: [December 13, 2018, 1:56pm UTC](https://community.graylog.org/t/migrate-configuration-mongodb-and-content-pack/7999/4 "2018-12-13T13:56:27Z")

</div>

> [@Totally\_Not\_A\_Robot](#):
>
> I see that you connected without authenticating.

Thanks for reply @Totally_Not_A_Robot, i think that too, but i get this message when i connect to mongodb:

“\*\* WARNING: Insecure configuration, access control is not enabled and no --bind\_ip has been specified.  
Read and write access to data and configuration is unrestricted,  
and the server listens on all available network interfaces.”

Still get no file with mongodump.

Thanks!

---

<div class="post-metadata">

### Author: ![jan](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jan/32/11_2.png) [@jan](https://community.graylog.org/u/jan)
#### Post date: [December 13, 2018, 2:46pm UTC](https://community.graylog.org/t/migrate-configuration-mongodb-and-content-pack/7999/5 "2018-12-13T14:46:51Z")

</div>

> @jan, does the Graylog OVA not use an application account for Graylog in MongoDB?

I’m not sure about that old version. Might be not implemented at that point.

@monchito sorry I’m not able to investigate in this, but I guess someone else is able to help you.

---

<div class="post-metadata">

### Author: ![monchito](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/monchito/32/3372_2.png) [@monchito](https://community.graylog.org/u/monchito)
#### Post date: [December 14, 2018, 12:24pm UTC](https://community.graylog.org/t/migrate-configuration-mongodb-and-content-pack/7999/6 "2018-12-14T12:24:05Z")

</div>

Hi, there is another way to the export the db … get json file or something like that?

Thanks!

---

<div class="post-metadata">

### Author: ![Totally\_Not\_A\_Robot](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/totally_not_a_robot/32/3353_2.png) [@Totally\_Not\_A\_Robot](https://community.graylog.org/u/Totally_Not_A_Robot)
#### Post date: [December 14, 2018, 6:26pm UTC](https://community.graylog.org/t/migrate-configuration-mongodb-and-content-pack/7999/7 "2018-12-14T18:26:25Z")

</div>

Of course 🙂 I don’t use `mongodump` in our environment, I use `mongoexport`…

---

<div class="post-metadata">

### Author: ![monchito](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/monchito/32/3372_2.png) [@monchito](https://community.graylog.org/u/monchito)
#### Post date: [December 17, 2018, 3:37pm UTC](https://community.graylog.org/t/migrate-configuration-mongodb-and-content-pack/7999/8 "2018-12-17T15:37:14Z")

</div>

Hi again, first: thanks so much for helping.

I exported content pack and mongodb (with mongoexport/mongoimport) it have to make 1 command per collection, here are the commands, maybe it is usefull for someone with the similar issues.

Collection from v2.4 (i can’t see on v2.0.3)

Collections:

alarmcallbackconfigurations  
alarmcallbackhistory  
alerts  
cluster\_config  
cluster\_events  
collectors  
content\_packs  
grok\_patterns  
index\_failures  
index\_ranges  
index\_sets  
lut\_caches  
lut\_data\_adapters  
lut\_tables  
nodes  
notifications  
pipeline\_processor\_pipelines  
pipeline\_processor\_pipelines\_streams  
pipeline\_processor\_rules  
roles  
sessions  
streamrules  
streams  
system\_messages  
traffic  
users

Graylog Server 2.0.3:  
mongoexport -d graylog -c **collectionName** -o /home/ubuntu/mongoExport/ **collectionName**.json

scp -r user@x.x.x.x:/home/ubuntu/mongoExport/ /home/user/mongoExport

Graylog Server 2.4:  
mongoimport --drop -d graylog -c **collectionName** --file **collectionName**.json

Rapidly i found Alerts in the new server is empty, maybe is handler diferent i gonna check more granularity.

Thanks!

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)
#### Post date: [December 31, 2018, 3:37pm UTC](https://community.graylog.org/t/migrate-configuration-mongodb-and-content-pack/7999/9 "2018-12-31T15:37:16Z")

</div>

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