<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:35:46 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-14724] How to take oplog backup, so that we can do point in time recovery</title>
                <link>https://jira.mongodb.org/browse/SERVER-14724</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;We have over 200GB database. We are taking mongodump and restore. But it is taking long time( backup 3-4 hours, restore 5-6 hours) and putting lots of load on server. We are planning to take everyday full backup and oplog backup in every hour. So that we can restore any point in time in case of any failure. We like to know how we can do this. We can&apos;t do on MMS cloud due to security issue. 10gen is asking $5000 per replica set. We are looking for any open source backup utility which can do this without spending too much money.&lt;/p&gt;

&lt;p&gt;Full Backup : 10 AM daily&lt;br/&gt;
OPlog : every hour.&lt;/p&gt;

&lt;p&gt;Restore any time like 11AM, 9PM applying oplog on top on Full backup.&lt;/p&gt;</description>
                <environment></environment>
        <key id="149860">SERVER-14724</key>
            <summary>How to take oplog backup, so that we can do point in time recovery</summary>
                <type id="6" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14720&amp;avatarType=issuetype">Question</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="stephen.steneker@mongodb.com">Stennie Steneker</assignee>
                                    <reporter username="sarbamangal">Sarbamangal Choudhury</reporter>
                        <labels>
                    </labels>
                <created>Tue, 29 Jul 2014 21:33:18 +0000</created>
                <updated>Wed, 10 Dec 2014 23:12:06 +0000</updated>
                            <resolved>Wed, 30 Jul 2014 05:43:21 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="681915" author="sarbamangal" created="Tue, 5 Aug 2014 17:55:57 +0000"  >&lt;p&gt;I tried this. But it did not work. I am getting this error during oplog apply:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;root@mongo-dba-test oplogR&amp;#93;&lt;/span&gt;# mongorestore -h 10.98.141.231 --port 27017 --oplogReplay --oplogLimit 1407127315:363  /data/test/oplogR&lt;br/&gt;
connected to: 10.98.141.231:27017&lt;br/&gt;
Tue Aug  5 13:33:56.785 The oplogLimit is not newer than the last oplog entry on the server.&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;root@mongo-dba-test oplogR&amp;#93;&lt;/span&gt;# mongorestore -h 10.98.141.231 --port 27017 --oplogReplay   /data/test/oplogR&lt;br/&gt;
connected to: 10.98.141.231:27017&lt;br/&gt;
Tue Aug  5 13:34:26.386 	 Replaying oplog&lt;br/&gt;
assertion: 13106 nextSafe(): &lt;/p&gt;
{ $err: &quot;Invalid ns [.$cmd]&quot;, code: 16256 }
&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;root@mongo-dba-test oplogR&amp;#93;&lt;/span&gt;# &lt;/p&gt;

&lt;p&gt;Also I posed this question. But I am not getting good response.&lt;/p&gt;</comment>
                            <comment id="676975" author="stennie" created="Wed, 30 Jul 2014 21:48:43 +0000"  >&lt;p&gt;Hi Sarbamangal,&lt;/p&gt;

&lt;p&gt;The replication oplog (&lt;a href=&quot;http://docs.mongodb.org/manual/core/replica-set-oplog/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://docs.mongodb.org/manual/core/replica-set-oplog/&lt;/a&gt;) is stored as a capped collection in MongoDB: &lt;tt&gt;oplog.rs&lt;/tt&gt; in the &lt;tt&gt;local&lt;/tt&gt; database.&lt;/p&gt;

&lt;p&gt;You can back the oplog up using a command line like:&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;mongodump --db local --collection oplog.rs --out oplog.bson&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;To do a point in time restore you can replay a newer oplog against a full data backup that includes an oplog with a point in common.&lt;/p&gt;

&lt;p&gt;An example of finding a point in time entry and replaying the oplog is included in Asya&apos;s StackOverflow answer that I suggested earlier: &lt;a href=&quot;http://stackoverflow.com/questions/15444920/modify-and-replay-mongodb-oplog/15451297#15451297&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://stackoverflow.com/questions/15444920/modify-and-replay-mongodb-oplog/15451297#15451297&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I recommend you try out the backup &amp;amp; restore process in a dev/UAT environment, and if you have any questions please follow up on an appropriate forum like the mongodb-user discussion group: &lt;a href=&quot;https://groups.google.com/forum/#!forum/mongodb-user&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://groups.google.com/forum/#!forum/mongodb-user&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you&apos;re interested in learning more about MongoDB operations, I would highly recommend our free online MongoDB University courses: &lt;a href=&quot;https://university.mongodb.com&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://university.mongodb.com&lt;/a&gt;. A point-in-time restore is one of the exercises in the Advanced Deployment &amp;amp; Operations (M202) course.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Stephen&lt;/p&gt;</comment>
                            <comment id="676808" author="sarbamangal" created="Wed, 30 Jul 2014 19:09:15 +0000"  >&lt;p&gt;Still I am not able to get my answer. I am looking how we can take oplog backup ( in every hour and save as file) and apply it when we need to. Say for example: Mysql , we can take full , incremental and bin log ( like oplog) backup and apply bin log( file) on top of full or incremental backup. I like to know how I can do this on Mongodb.&lt;/p&gt;</comment>
                            <comment id="676020" author="stennie" created="Wed, 30 Jul 2014 05:43:21 +0000"  >&lt;p&gt;Hi Sarbamangal,&lt;/p&gt;

&lt;p&gt;The SERVER project is for reporting bugs or feature suggestions for the MongoDB server.&lt;/p&gt;

&lt;p&gt;For MongoDB-related community support discussion please post on the mongodb-users group (&lt;a href=&quot;http://groups.google.com/group/mongodb-user&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://groups.google.com/group/mongodb-user&lt;/a&gt;) or Stack Overflow / ServerFault.&lt;/p&gt;

&lt;p&gt;I&apos;m not sure what sort of deployment you are backing up (eg. replica set vs sharded cluster) but the MongoDB documentation has more information on different &lt;a href=&quot;http://docs.mongodb.org/manual/core/backups/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Backup Methods&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Backing up with &lt;tt&gt;mongodump&lt;/tt&gt; will create the smallest backup file because you are only exporting the data and index definitions, but also will take the longest time for a full restore as &lt;tt&gt;mongod&lt;/tt&gt; needs to rebuild all of the data files and then the indexes.&lt;/p&gt;

&lt;p&gt;The typical (and fastest) approach for taking a backup would be to use a filesystem or EC2 snapshot. For example, see: &lt;a href=&quot;http://docs.mongodb.org/manual/tutorial/backup-with-filesystem-snapshots/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Backup and Restore with Filesystem Snapshots&lt;/a&gt; or &lt;a href=&quot;http://docs.mongodb.org/manual/tutorial/backup-sharded-cluster-with-filesystem-snapshots/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Backup a Sharded Cluster with Filesystem Snapshots&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For an example of point-in-time recovery using the oplog, see Asya&apos;s answer on StackOverflow: &lt;a href=&quot;http://stackoverflow.com/questions/15444920/modify-and-replay-mongodb-oplog/15451297#15451297&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Modify and replay MongoDB oplog&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Regards,&lt;br/&gt;
Stephen&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>4.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 30 Jul 2014 01:24:25 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        9 years, 28 weeks, 1 day 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>
                            9 years, 28 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>sarbamangal</customfieldvalue>
            <customfieldvalue>stephen.steneker@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrlqtr:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>129984</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_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|hs2vnz:</customfieldvalue>

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