<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:56:40 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-1311] mongodump/mongorestore loses information such as capped params</title>
                <link>https://jira.mongodb.org/browse/SERVER-1311</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Doing a dump, then a drop then a restore does not give you back what you had before.  In particular meta-information about a collection such as it being capped and the capped size is not restored.  I believe that paddingFactor is also lost although that won&apos;t be a functional difference like a collection being capped or not.&lt;/p&gt;</description>
                <environment></environment>
        <key id="12271">SERVER-1311</key>
            <summary>mongodump/mongorestore loses information such as capped params</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="spencer@mongodb.com">Spencer Brody</assignee>
                                    <reporter username="rogerbinns">Roger Binns</reporter>
                        <labels>
                    </labels>
                <created>Mon, 28 Jun 2010 11:37:28 +0000</created>
                <updated>Tue, 12 Jul 2016 00:28:06 +0000</updated>
                            <resolved>Mon, 12 Dec 2011 22:23:31 +0000</resolved>
                                    <version>1.4.3</version>
                                    <fixVersion>2.1.0</fixVersion>
                                    <component>Tools</component>
                                        <votes>13</votes>
                                    <watches>12</watches>
                                                                                                                <comments>
                            <comment id="72606" author="auto" created="Mon, 12 Dec 2011 22:19:15 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;stbrody&apos;, u&apos;name&apos;: u&apos;Spencer T Brody&apos;, u&apos;email&apos;: u&apos;spencer@10gen.com&apos;}
&lt;p&gt;Message: Log a warning when restoring with different options than existing collection. &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1311&quot; title=&quot;mongodump/mongorestore loses information such as capped params&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1311&quot;&gt;&lt;del&gt;SERVER-1311&lt;/del&gt;&lt;/a&gt;.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/3dd48a56ab7b0dbdbe2ce8ee1d3b9ee84c303b2b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/3dd48a56ab7b0dbdbe2ce8ee1d3b9ee84c303b2b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="71431" author="auto" created="Wed, 7 Dec 2011 16:49:22 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;stbrody&apos;, u&apos;name&apos;: u&apos;Spencer T Brody&apos;, u&apos;email&apos;: u&apos;spencer@10gen.com&apos;}
&lt;p&gt;Message: Add test for dumping and restoring indexes and collection metadata. &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1311&quot; title=&quot;mongodump/mongorestore loses information such as capped params&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1311&quot;&gt;&lt;del&gt;SERVER-1311&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/9122c89a7d58a8639e8625e1e4ed8767c4b7dd6b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/9122c89a7d58a8639e8625e1e4ed8767c4b7dd6b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="71430" author="auto" created="Wed, 7 Dec 2011 16:49:20 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;stbrody&apos;, u&apos;name&apos;: u&apos;Spencer T Brody&apos;, u&apos;email&apos;: u&apos;spencer@10gen.com&apos;}
&lt;p&gt;Message: Make mongorestore restore collection options and indexes from the metadata file. &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1311&quot; title=&quot;mongodump/mongorestore loses information such as capped params&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1311&quot;&gt;&lt;del&gt;SERVER-1311&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/b54e8babe232ef2e9e5c71674b96c22855cc063b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/b54e8babe232ef2e9e5c71674b96c22855cc063b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="71429" author="auto" created="Wed, 7 Dec 2011 16:49:19 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;stbrody&apos;, u&apos;name&apos;: u&apos;Spencer T Brody&apos;, u&apos;email&apos;: u&apos;spencer@10gen.com&apos;}
&lt;p&gt;Message: Make mongodump create a metadata file with collection options and indexes to be used by mongorestore. &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1311&quot; title=&quot;mongodump/mongorestore loses information such as capped params&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1311&quot;&gt;&lt;del&gt;SERVER-1311&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/a3aaded21e2f306714ebafd3a1e55ef175ce77fc&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/a3aaded21e2f306714ebafd3a1e55ef175ce77fc&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="46237" author="spencer" created="Wed, 3 Aug 2011 23:55:10 +0000"  >&lt;p&gt;If not using --drop check the system.namespaces collection and output a warning if the options don&apos;t match the options that were dumped.&lt;/p&gt;</comment>
                            <comment id="46231" author="redbeard0531" created="Wed, 3 Aug 2011 23:38:11 +0000"  >&lt;p&gt;Decided solution:&lt;/p&gt;

&lt;p&gt;Create a collection_name.metadata.json file that has the following format:&lt;br/&gt;
{options: {}, indexes:&lt;span class=&quot;error&quot;&gt;&amp;#91;{}&amp;#93;&lt;/span&gt;}&lt;/p&gt;

&lt;p&gt;options is optional and will only be there if the options field exists in db.system.namespaces.findOne(&lt;/p&gt;
{name:&apos;db.collection&apos;}
&lt;p&gt;)&lt;br/&gt;
If it is, on restore make sure to update the name of the collection and run that object as a command.&lt;/p&gt;

&lt;p&gt;indexes is a list of the objects in db.system.indexes.find(&lt;/p&gt;
{ns: &apos;db.collection&apos;}
&lt;p&gt;). On restore, after inserting the data for the collection, update the ns field and reinsert all the index objects.&lt;/p&gt;

&lt;p&gt;Make sure mongorestore works even without a metadata.json file&lt;/p&gt;</comment>
                            <comment id="35435" author="eliot" created="Wed, 1 Jun 2011 00:39:08 +0000"  >&lt;p&gt;This might be a dupe&lt;/p&gt;</comment>
                            <comment id="15128" author="rogerbinns" created="Mon, 28 Jun 2010 14:07:39 +0000"  >&lt;p&gt;Actually it looks like I can do your solution instead, since I really don&apos;t want to hard code what attributes are normal/default for a collection.  I was expecting system.namespaces to have a lot more crud in it.   New algorithm:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;For each doc in system.namespaces, if there are any keys other than name or options then output doc.  If options contains any non-create key with non-null value then output that else exclude options  For the vast majority of cases nothing would be output.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;Output goes into system.namespaces.json  (edit: same format as mongoexport - one json doc per line)&lt;/li&gt;
&lt;/ul&gt;


&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;On restore use appropriate entry &quot;options&quot; key to create collection if it exists&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="15127" author="rogerbinns" created="Mon, 28 Jun 2010 13:59:01 +0000"  >&lt;p&gt;Thanks.  What I am going to implement is this:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;If the directory contains a file named system.namespaces.* then leave everything up to mongorestore&lt;/li&gt;
	&lt;li&gt;If a collection.parm file exists then use it to create the collection&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;That should tide me over until Mongo has the official fix in, working with current and future versions.&lt;/p&gt;

&lt;p&gt;BTW I would assume that having system.namespaces.bson would be really bad since older versions of mongorestore would try to restore it unilaterally.  Using .json would avoid that issue.&lt;/p&gt;</comment>
                            <comment id="15124" author="eliot" created="Mon, 28 Jun 2010 13:39:27 +0000"  >&lt;p&gt;I guess we could make it system.namespaces.json instead of system.namespaces.bson&lt;br/&gt;
Don&apos;t want to add another extension (.parm) though&lt;/p&gt;</comment>
                            <comment id="15122" author="eliot" created="Mon, 28 Jun 2010 13:38:51 +0000"  >&lt;p&gt;I think we&apos;ll probably do something different.&lt;/p&gt;

&lt;p&gt;Most likely we&apos;ll just write a system.namespaces.bson since that&apos;s what the name already is.&lt;/p&gt;

&lt;p&gt;Then we&apos;ll just be smart about applying it.&lt;/p&gt;</comment>
                            <comment id="15121" author="rogerbinns" created="Mon, 28 Jun 2010 13:36:53 +0000"  >&lt;p&gt;Is my proposed solution acceptable?  I need to implement something today, ideally the same or compatible with the eventual official fix.&lt;/p&gt;</comment>
                            <comment id="15117" author="rogerbinns" created="Mon, 28 Jun 2010 12:23:15 +0000"  >&lt;p&gt;I&apos;d like to propose the following solution:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;When doing a dump also create a collectionname.parm file alongside the .bson file.  The contents are a single JSON object with parameters for creating the collection.  This file only contains non-default parameters, and the whole file is omitted if it would otherwise be empty&lt;/li&gt;
&lt;/ul&gt;


&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;When doing a restore, if the collection does not already exist (or was dropped) and there is a collectionname.parm file then the collection is created using those parameters&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This will be forwards and backwards compatible with existing dumps and in the vast majority of cases the dumps will be identical.&lt;/p&gt;

&lt;p&gt;Reasoning:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;.parm extension is same length as .bson so that we don&apos;t hit any filename length issues&lt;/li&gt;
&lt;/ul&gt;


&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;JSON is human readable&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="11591">SERVER-808</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>13.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 28 Jun 2010 13:38:51 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        12 years, 10 weeks, 2 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            12 years, 10 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>mathias@mongodb.com</customfieldvalue>
            <customfieldvalue>rogerbinns</customfieldvalue>
            <customfieldvalue>spencer@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrpkp3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrgfh3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9416</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10166" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Tests Written</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10154"><![CDATA[Complete]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht07dj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>