<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Trouble importing mongodb data to Rocket.Chat]]></title><description><![CDATA[<p dir="auto">We're attempting to migrate our Rockat.Chat instance from an Ubuntu Snap installation onto our Cloudron instance. Following the instructions at <a href="https://cloudron.io/documentation/guides/import-mongodb/" target="_blank" rel="noopener noreferrer nofollow ugc">https://cloudron.io/documentation/guides/import-mongodb/</a> (we used the backupdb command from <a href="https://docs.rocket.chat/installation/snaps" target="_blank" rel="noopener noreferrer nofollow ugc">https://docs.rocket.chat/installation/snaps</a> to get our Mongo DB backup as it uses mongodump under the hood) almost works but we ran into some roadblocks:</p>
<ol>
<li>The first time we attempted a restore it resulted in an error at the end of the import. Sorry I don't have the exact error as it disappeared from the terminal window before I copied it. It was something similar to "failed: Could not import index bio_1 because it already exists with different options".</li>
</ol>
<p dir="auto">Turning the app back on, it spins up correctly and we are able to login. Everything seems to work <em>except</em> that the most recent chat messages are from over a year ago. The chat channels are correct, users are correct, everything else seems to be correct - although we didn't run extensive tests.</p>
<ol start="2">
<li>Due to the previous error, we tried running the mongorestore command using the "--drop" option. We thought that might get around the previous error. It seemed to work, but now we receive this error instead:</li>
</ol>
<p dir="auto">2020-08-07T01:23:03.863+0000    Failed: d1c4b380-6f69-46f9-8517-609de87b8407.rocketchat_livechat_inquiry: error creating indexes for d1c4b380-6f69-46f9-8517-609de87b8407.rocketchat_livechat_inquiry: cannot restore index with namespace 'd1c4b380-6f69-46f9-8517-609de87b8407.rocketchat_livechat_inquiry.$queueOrder_1_estimatedWaitingTimeQueue_1_estimatedServiceTimeAt_1': namespace is too long (max size is 127 bytes)</p>
<p dir="auto">After turning the app back on, we get a similar result to above. Everything seems to work except that the most recent messages are from over a year ago (but a different date this time).</p>
<p dir="auto">Doing some research, it appears that Mongo DB 3.6.3 has a hard limit on the index namespace size that we can't get around:</p>
<p dir="auto"><a href="https://docs.mongodb.com/manual/reference/limits/" target="_blank" rel="noopener noreferrer nofollow ugc">https://docs.mongodb.com/manual/reference/limits/</a></p>
<p dir="auto">Perhaps the BSON file size limit is also affecting us here. Our rocketchat_uploads.chunks.bson file in the Mongo backup is &gt; 400 Mb. But we don't know.</p>
<p dir="auto">So my question is... Is there a way to upgrade the Mongo DB instance in the Cloudron Addon to a newer version (4.2+) that doesn't have some of these limits? Or can you suggest another way to import our data?</p>
<p dir="auto">It's important to some of our stakeholders that we maintain the chat history in our migration.</p>
]]></description><link>https://forum.cloudron.io/topic/2994/trouble-importing-mongodb-data-to-rocket-chat</link><generator>RSS for Node</generator><lastBuildDate>Sun, 08 Mar 2026 08:05:03 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/2994.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 08 Aug 2020 03:57:50 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Trouble importing mongodb data to Rocket.Chat on Mon, 17 Aug 2020 17:09:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/robw" aria-label="Profile: robw">@<bdi>robw</bdi></a> <a class="plugin-mentions-user plugin-mentions-a" href="/user/alex-adestech" aria-label="Profile: alex-adestech">@<bdi>alex-adestech</bdi></a> An update on this.</p>
<p dir="auto">Crux of the issue is that the indices name generated are too long. <a class="plugin-mentions-user plugin-mentions-a" href="/user/alex-adestech" aria-label="Profile: alex-adestech">@<bdi>alex-adestech</bdi></a> pointed out to me that this issue only sorted out in MongoDB 4.4 and not even MongoDB 4.2. Searching through the rocket.chat issue tracker I saw only person hit this and nobody replied. Search further, I found that Rocket.Chat doesn't even support MongoDB 4.2. The releases page mentions the versions they test with - <a href="https://github.com/RocketChat/Rocket.Chat/releases" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/RocketChat/Rocket.Chat/releases</a>. This got me wondering why we hit this issue. Well, the answer it turns out is that Cloudron generates 32 byte mongodb database names for apps. This in turn ends up affecting the length of the index.</p>
<p dir="auto">I have made a fix now for Cloudron 5.6 that generates shorter names. (We have had to do something similar for apps using MySQL as well in the past).</p>
]]></description><link>https://forum.cloudron.io/post/12214</link><guid isPermaLink="true">https://forum.cloudron.io/post/12214</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Mon, 17 Aug 2020 17:09:57 GMT</pubDate></item><item><title><![CDATA[Reply to Trouble importing mongodb data to Rocket.Chat on Fri, 14 Aug 2020 21:03:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alex-adestech" aria-label="Profile: alex-adestech">@<bdi>alex-adestech</bdi></a> Yes, the 4.2 update is scheduled for next Cloudron release (in a couple of weeks). The 5.5 release only updated Mongo to 4.0. This was a necessary step to upgrade to 4.2. I put it here - <a href="https://forum.cloudron.io/topic/3018/what-s-coming-in-5-6">https://forum.cloudron.io/topic/3018/what-s-coming-in-5-6</a></p>
]]></description><link>https://forum.cloudron.io/post/12155</link><guid isPermaLink="true">https://forum.cloudron.io/post/12155</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Fri, 14 Aug 2020 21:03:16 GMT</pubDate></item><item><title><![CDATA[Reply to Trouble importing mongodb data to Rocket.Chat on Fri, 14 Aug 2020 20:26:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/girish" aria-label="Profile: girish">@<bdi>girish</bdi></a> are there any plans for upgrading mongodb to 4.2 soon? I have the same error even with Cloudron 5.5. I cannot use Rocket.Chat at all, it says "Not Responding" and already submitted an app_error issue.</p>
]]></description><link>https://forum.cloudron.io/post/12150</link><guid isPermaLink="true">https://forum.cloudron.io/post/12150</guid><dc:creator><![CDATA[alex-adestech]]></dc:creator><pubDate>Fri, 14 Aug 2020 20:26:02 GMT</pubDate></item><item><title><![CDATA[Reply to Trouble importing mongodb data to Rocket.Chat on Tue, 11 Aug 2020 00:51:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/robw" aria-label="Profile: robw">@<bdi>robw</bdi></a> I have updated monogodb to 4.0 for Cloudron 5.5. We can then upgrade to 4.2 for the release after. (4.0 is a necessary mid-step before upgrading to 4.2).</p>
]]></description><link>https://forum.cloudron.io/post/11959</link><guid isPermaLink="true">https://forum.cloudron.io/post/11959</guid><dc:creator><![CDATA[girish]]></dc:creator><pubDate>Tue, 11 Aug 2020 00:51:33 GMT</pubDate></item><item><title><![CDATA[Reply to Trouble importing mongodb data to Rocket.Chat on Mon, 10 Aug 2020 12:14:24 GMT]]></title><description><![CDATA[<p dir="auto">Ah... Thank for for being willing to check that out, and I'd love to be able to help (really would), but one of the main reasons we run Rocket.Chat is to keep our internal comms and client data behind our own firewall and never let it out. <img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=c3aa4c12b7e" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
<p dir="auto">I did a quick search and there doesn't seem to be any existing way to generate a larger data set for testing.</p>
<p dir="auto">Can I help in another way? Would it help to see a list of file sizes in the backup set? Most of them aren't that big, the one I mentioned is the biggest as I guess it is storage of the uploaded files.</p>
]]></description><link>https://forum.cloudron.io/post/11943</link><guid isPermaLink="true">https://forum.cloudron.io/post/11943</guid><dc:creator><![CDATA[robw]]></dc:creator><pubDate>Mon, 10 Aug 2020 12:14:24 GMT</pubDate></item><item><title><![CDATA[Reply to Trouble importing mongodb data to Rocket.Chat on Mon, 10 Aug 2020 09:53:06 GMT]]></title><description><![CDATA[<p dir="auto">Depending on how sensitive your data is, it might be very helpful to get a copy of this to debug and verify a potential fix on our side. If that is ok with you, maybe send a mail to <a href="mailto:support@cloudron.io" target="_blank" rel="noopener noreferrer nofollow ugc">support@cloudron.io</a> with a possible download link for the data set. Otherwise we may have to find a way how to produce such a large set in the first place.</p>
]]></description><link>https://forum.cloudron.io/post/11942</link><guid isPermaLink="true">https://forum.cloudron.io/post/11942</guid><dc:creator><![CDATA[nebulon]]></dc:creator><pubDate>Mon, 10 Aug 2020 09:53:06 GMT</pubDate></item><item><title><![CDATA[Reply to Trouble importing mongodb data to Rocket.Chat on Mon, 10 Aug 2020 09:50:05 GMT]]></title><description><![CDATA[<p dir="auto">Ok, thanks for the response <a class="plugin-mentions-user plugin-mentions-a" href="/user/nebulon" aria-label="Profile: nebulon">@<bdi>nebulon</bdi></a> - We will wait patiently and see. I understand that a Mongo upgrade in the platform is a significant change.</p>
<p dir="auto">Of course we are just assuming that the index import failure is the problem. There might be other problems too. <img src="https://forum.cloudron.io/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=c3aa4c12b7e" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /> But it does seem like exactly the kind of problem that would cause everything else to work but the messages to stop at a certain date... Anyway it would certainly be nice to update that index size capability to make migrations from other platforms easier. It looks like a showstopper at the moment.</p>
<p dir="auto">I'm guessing the problem is the length of the container name coupled with a long index name in the Rocket.Chat app. And I guess that's also not something that can be changed.</p>
<p dir="auto">For further info:<br />
Our snap on the source server is running Mongo DB 3.6.14 - so database compatibility shouldn't be an issue I suppose. Probably not too relevant. Do you need any other info?</p>
]]></description><link>https://forum.cloudron.io/post/11941</link><guid isPermaLink="true">https://forum.cloudron.io/post/11941</guid><dc:creator><![CDATA[robw]]></dc:creator><pubDate>Mon, 10 Aug 2020 09:50:05 GMT</pubDate></item><item><title><![CDATA[Reply to Trouble importing mongodb data to Rocket.Chat on Mon, 10 Aug 2020 08:42:55 GMT]]></title><description><![CDATA[<p dir="auto">Looking at the docs you provided, it indeed seems that there is no way around updating mongodb in the addon to support that case.<br />
This may take some time though to test and possibly find any backwards compatibility issues.</p>
<p dir="auto">I've added an issue to track this at <a href="https://git.cloudron.io/cloudron/box/-/issues/725" target="_blank" rel="noopener noreferrer nofollow ugc">https://git.cloudron.io/cloudron/box/-/issues/725</a></p>
]]></description><link>https://forum.cloudron.io/post/11938</link><guid isPermaLink="true">https://forum.cloudron.io/post/11938</guid><dc:creator><![CDATA[nebulon]]></dc:creator><pubDate>Mon, 10 Aug 2020 08:42:55 GMT</pubDate></item><item><title><![CDATA[Reply to Trouble importing mongodb data to Rocket.Chat on Sat, 08 Aug 2020 04:04:57 GMT]]></title><description><![CDATA[<p dir="auto">Update: Tried running this from the mongodb console:<br />
<a href="https://docs.mongodb.com/manual/reference/command/setFeatureCompatibilityVersion/#view-fcv" target="_blank" rel="noopener noreferrer nofollow ugc">https://docs.mongodb.com/manual/reference/command/setFeatureCompatibilityVersion/#view-fcv</a></p>
<p dir="auto">But permission is denied. I'm not sure that would help anyway, as from what I read the limit is still there but just ignored on the import, so I suspect the index could not be used by the app even if it was imported.</p>
<p dir="auto">Also tried the --bypassDocumentValidation option on mongorestore from <a href="https://docs.mongodb.com/v3.6/reference/program/mongorestore/" target="_blank" rel="noopener noreferrer nofollow ugc">https://docs.mongodb.com/v3.6/reference/program/mongorestore/</a> but the import log indicates permission is denied on that too. (Not sure if it would help, just some trial and error. Thought it might help if our BSON files were too big.)</p>
]]></description><link>https://forum.cloudron.io/post/11906</link><guid isPermaLink="true">https://forum.cloudron.io/post/11906</guid><dc:creator><![CDATA[robw]]></dc:creator><pubDate>Sat, 08 Aug 2020 04:04:57 GMT</pubDate></item></channel></rss>