{"id":1886,"date":"2018-08-18T23:52:00","date_gmt":"2018-08-18T23:52:00","guid":{"rendered":"http:\/\/dbtut.com\/?p=1886"},"modified":"2018-11-11T20:28:56","modified_gmt":"2018-11-11T20:28:56","slug":"point-in-time-recovery-on-mongodb-standalone-server","status":"publish","type":"post","link":"https:\/\/dbtut.com\/index.php\/2018\/08\/18\/point-in-time-recovery-on-mongodb-standalone-server\/","title":{"rendered":"Point in time recovery on Mongodb Standalone server."},"content":{"rendered":"<p>&nbsp;<\/p>\n<p><strong>1:- Enable oplog\u00a0using &#8211;master option while starting mongod service [Version 3.2]. And\u00a0later version (3.2 +) need to put replSetName=rs0 into the mongo.conf file in replication section.<\/strong><\/p>\n<p style=\"padding-left: 60px;\"><span style=\"color: #ff0000;\"><strong>Note :-<\/strong> <\/span>Version <strong>3.2+<\/strong> after enabling oplog by putting replica set name into the conf file, Need to take login in mongo and run command <code><strong>rs.intiate()<\/strong><\/code> and fire <strong>enter<\/strong> button for\u00a0 <strong>2-3 times<\/strong> it will show like<\/p>\n<p style=\"padding-left: 60px;\"><strong>Primary&gt;<\/strong><\/p>\n<p style=\"padding-left: 60px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/344.png\" \/><\/p>\n<p><strong>2:- Take a login into the mongo and check oplog is generated or not.<\/strong><\/p>\n<p style=\"padding-left: 60px;\"><span style=\"color: #ff0000;\"><strong>Note :-<\/strong><\/span> Version<strong> 3.2 +<\/strong>, When you will run show dbs command it will show 2 databases admin and local. Use local and check collections by below commands.<\/p>\n<p style=\"padding-left: 60px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/225.png\" \/><\/p>\n<p><strong>3:- Create your own database and collection by entering below commands.<\/strong><\/p>\n<p style=\"padding-left: 60px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/414.png\" \/><\/p>\n<p style=\"padding-left: 60px;\"><span style=\"color: #ff0000;\"><strong>Note:-<\/strong> <\/span>When you insert documents into the collection by any collection name it will create that name of collection by its own.<\/p>\n<p style=\"padding-left: 60px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/802.png\" \/><\/p>\n<p style=\"padding-left: 60px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/824.png\" \/><\/p>\n<blockquote>\n<p style=\"padding-left: 30px;\"><span style=\"color: #339966;\"><strong>You can use below command to insert bulk data into the collection for testing purpose.<\/strong><\/span><\/p>\n<p style=\"padding-left: 30px;\"><code>for (var i=0; i &lt;= 10;i++){db.mycol1.insert({\"count\":i,\"username\":\"user\"+i,\"password\":(Math.random()+1).toString(36).substring(7),createdOn:new Date(),score:0})}<\/code><\/p>\n<\/blockquote>\n<p style=\"padding-left: 60px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/342.png\" \/><\/p>\n<p><strong>4:- Check you documents which you inserted through below command.<\/strong><\/p>\n<p style=\"padding-left: 60px;\"><code>db.collection_name.find()<\/code><\/p>\n<p style=\"padding-left: 60px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/777.png\" \/><\/p>\n<p><strong>5:- Take backup of mongo server thorough below commands.<\/strong><\/p>\n<p style=\"padding-left: 60px;\"><code>Mongodump\u00a0 --user user_name\u00a0 -- pass\u00a0 password\u00a0 --port port_number\u00a0 --authenticationDatabase\u00a0 admin<\/code><\/p>\n<p style=\"padding-left: 60px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/842.png\" \/><\/p>\n<p><strong>6:- If you did not specify the location of the dump file it will create backup into the present working directory by the name of dump.<\/strong><\/p>\n<p style=\"padding-left: 60px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/449-1.png\" \/><\/p>\n<p><strong>7:- Now We have deleted some records from below command.<\/strong><\/p>\n<p style=\"padding-left: 60px;\"><code>Db.collection_name.remove()<\/code><\/p>\n<p style=\"padding-left: 60px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/506.png\" \/><\/p>\n<p style=\"padding-left: 60px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/141.png\" \/><\/p>\n<p><strong>8:- Now check how many records are present in the collection after deletion of records from above.<\/strong><\/p>\n<p style=\"padding-left: 60px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/471.png\" \/><\/p>\n<p><strong>9:- Again we have inserted some more records in to the same collections through below command.<\/strong><\/p>\n<p style=\"padding-left: 60px;\"><code>Db.collection_name.insert([ ])<\/code><\/p>\n<p style=\"padding-left: 60px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/785-1.png\" \/><\/p>\n<p><strong>10:- Check records available or count of the records from below command.<\/strong><\/p>\n<p style=\"padding-left: 60px;\"><code>Db.collection_name.find()<\/code><\/p>\n<p style=\"padding-left: 60px;\"><code>Db.collection_name.count()<\/code><\/p>\n<p style=\"padding-left: 60px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/884.png\" \/><\/p>\n<p><strong>11:- Now we are taking whole oplog backup though below command.<\/strong><\/p>\n<p style=\"padding-left: 60px;\"><code>Mongodump\u00a0 --user user_name\u00a0 -- pass password\u00a0 --port port_number\u00a0 - d local\u00a0 -c \u2018oplog.$main\u2019\u00a0 --out desination<\/code><\/p>\n<p style=\"padding-left: 60px;\"><span style=\"color: #ff0000;\"><strong>Note:-<\/strong><\/span> Version <strong>3.2+<\/strong> oplog collection name was oplog.rs instead of \u2018oplog.$main\u2019<\/p>\n<p style=\"padding-left: 60px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/832.png\" \/><\/p>\n<p><strong>12:- It will generate below directory.<\/strong><\/p>\n<p style=\"padding-left: 60px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/752.png\" \/><\/p>\n<p style=\"padding-left: 60px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/709.png\" \/><\/p>\n<p><strong>13:- For point in time recovery you must need to know the timestamp of the records deleted.<\/strong><\/p>\n<p style=\"padding-left: 60px;\"><code>d=db.getSiblingDB(\"local\")<\/code><\/p>\n<p style=\"padding-left: 60px;\"><code>d.oplog.rs.find({\"ns\":\"test.mycol1\",\"op\":\"d\"}).sort({$natural:1}).limit(5)<\/code><\/p>\n<p style=\"padding-left: 60px;\"><span style=\"color: #ff0000;\"><strong>Note:-<\/strong> <\/span>From above command we checking first deleted records time stamp. In your case might be much more records were deleted so check the latest deleted timestamp with lowest second value like below.<\/p>\n<p style=\"padding-left: 60px;\"><span style=\"color: #0000ff;\">Timestamp(1533210442, 1)<\/span><\/p>\n<p style=\"padding-left: 60px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/446.png\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>14:- Here we are checking last deleted records timestamp through below command.<\/strong><\/p>\n<p style=\"padding-left: 60px;\"><code>d=db.getSiblingDB(\"local\")<\/code><\/p>\n<p style=\"padding-left: 60px;\"><code>d.oplog.rs.find({\"ns\":\"test.mycol1\",\"op\":\"d\"}).sort({$natural:-1}).limit(5)<\/code><\/p>\n<p style=\"padding-left: 60px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/174.png\" \/><\/p>\n<p><strong>15:- Here We are capturing last inserted records timestamp with the help of below command.<\/strong><\/p>\n<p style=\"padding-left: 60px;\"><code>d=db.getSiblingDB(\"local\")<\/code><\/p>\n<p style=\"padding-left: 60px;\"><code>d.oplog.rs.find({\"ns\":\"test.mycol1\",\"op\":\"i\"}).sort({$natural:-1}).limit(5)<\/code><\/p>\n<p style=\"padding-left: 60px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/245-1.png\" \/><\/p>\n<p style=\"padding-left: 60px;\"><span style=\"color: #ff0000;\"><strong>Note:-<\/strong><\/span> Oplog timestamp is in epoch format to get the correct timestamp values you need to convert it into the human readable format.<\/p>\n<p><strong>16:- Now we are taking backup of oplog between the last deleted records to last inserted records. To recover the data till the last point of data.<\/strong><\/p>\n<p style=\"padding-left: 60px;\"><code>mongodump -d local -c oplog.rs --query \"{\"ts\":{\\$gte: Timestamp(1533211865, 1),\\$lte: Timestamp(1533212149, 3)}}\" --out destination_path<\/code><\/p>\n<p style=\"padding-left: 60px;\"><span style=\"color: #339966;\">Here you need to put timestamp with were captured from <strong>13 and 14 step<\/strong>, <\/span><\/p>\n<p style=\"padding-left: 60px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/806.png\" \/><\/p>\n<p style=\"padding-left: 60px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/222.png\" \/><\/p>\n<p style=\"padding-left: 60px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/731-2.png\" \/><\/p>\n<p><strong>17:- As of now we have 9 records into the collection and we have deleted 2 records earlier, so total should be 11 records.<\/strong><\/p>\n<p style=\"padding-left: 60px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/642.png\" \/><\/p>\n<p><strong>18:- Now drop the collection from below command.<\/strong><\/p>\n<p style=\"padding-left: 60px;\"><code>Use test<\/code><\/p>\n<p style=\"padding-left: 60px;\"><code>Db.collection_name.drop()<\/code><\/p>\n<p style=\"padding-left: 60px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/738.png\" \/><\/p>\n<p><strong>19:- Now we are restoring full backup which we are taken into the step 5.<\/strong><\/p>\n<p style=\"padding-left: 60px;\">Go to the backup path directory and run below command.<\/p>\n<p style=\"padding-left: 60px;\"><code>Mongorestore\u00a0 -- user user_name\u00a0 -- pass password\u00a0 -- port port_number<\/code><\/p>\n<p style=\"padding-left: 60px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/783.png\" \/><\/p>\n<p><strong>20:- Check the restored records with the below command , shown in screenshot.<\/strong><\/p>\n<p style=\"padding-left: 60px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/729.png\" \/><\/p>\n<p><strong>21:- Before restoring the oplog backup which we are taken in step 11, that should be rename because restore command will not take it.<\/strong><\/p>\n<p style=\"padding-left: 60px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/927.png\" \/><\/p>\n<p><strong>22:- Now we are restoring oplog bakup which we are taken in step 11 from below command.<\/strong><\/p>\n<p style=\"padding-left: 60px;\"><code>mongorestore --oplogReplay --oplogLimit 1533210442:1 .\/<\/code><\/p>\n<p style=\"padding-left: 60px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/660.png\" \/><\/p>\n<p><strong>23:- Check the restored value up to the deleted records.<\/strong><\/p>\n<p style=\"padding-left: 60px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/588.png\" \/><\/p>\n<p><strong>24:- Follow the steps 21 and restore the oplog backup which were taken in step 16.<\/strong><\/p>\n<p style=\"padding-left: 60px;\"><code>mongorestore --oplogReplay --oplogLimit 1533212149:4 .\/<\/code><\/p>\n<p style=\"padding-left: 60px;\"><span style=\"color: #ff0000;\"><strong>Note:-<\/strong><\/span> put timestamp which we were captured in <strong>step\u00a0 15<\/strong> with second value increased.<\/p>\n<p style=\"padding-left: 60px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/752-1.png\" \/><\/p>\n<p><strong>25:- Now check the recovered records.<\/strong><\/p>\n<p style=\"padding-left: 60px;\"><img decoding=\"async\" src=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/990.png\" \/><\/p>\n\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_1886\" class=\"pvc_stats all  \" data-element-id=\"1886\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; 1:- Enable oplog\u00a0using &#8211;master option while starting mongod service [Version 3.2]. And\u00a0later version (3.2 +) need to put replSetName=rs0 into the mongo.conf file in replication section. Note :- Version 3.2+ after enabling oplog by putting replica set name into the conf file, Need to take login in mongo and run command rs.intiate() and fire &hellip;<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_1886\" class=\"pvc_stats all  \" data-element-id=\"1886\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":114,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[1306,1388],"tags":[143,1117,1371,1402],"class_list":["post-1886","post","type-post","status-publish","format-standard","","category-mongodb","category-nosql","tag-database-recovery","tag-database-recovery-models","tag-mongodb","tag-mongodb-log"],"aioseo_notices":[],"a3_pvc":{"activated":true,"total_views":2573,"today_views":0},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Point in time recovery on Mongodb Standalone server. - Database Tutorials<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dbtut.com\/index.php\/2018\/08\/18\/point-in-time-recovery-on-mongodb-standalone-server\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Point in time recovery on Mongodb Standalone server. - Database Tutorials\" \/>\n<meta property=\"og:description\" content=\"&nbsp; 1:- Enable oplog\u00a0using &#8211;master option while starting mongod service [Version 3.2]. And\u00a0later version (3.2 +) need to put replSetName=rs0 into the mongo.conf file in replication section. Note :- Version 3.2+ after enabling oplog by putting replica set name into the conf file, Need to take login in mongo and run command rs.intiate() and fire &hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dbtut.com\/index.php\/2018\/08\/18\/point-in-time-recovery-on-mongodb-standalone-server\/\" \/>\n<meta property=\"og:site_name\" content=\"Database Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2018-08-18T23:52:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-11-11T20:28:56+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/344.png\" \/>\n<meta name=\"author\" content=\"Rabikumar Singh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Rabikumar Singh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/18\/point-in-time-recovery-on-mongodb-standalone-server\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/18\/point-in-time-recovery-on-mongodb-standalone-server\/\"},\"author\":{\"name\":\"Rabikumar Singh\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/1524185631674ed9ab75aa8ae87bb0d7\"},\"headline\":\"Point in time recovery on Mongodb Standalone server.\",\"datePublished\":\"2018-08-18T23:52:00+00:00\",\"dateModified\":\"2018-11-11T20:28:56+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/18\/point-in-time-recovery-on-mongodb-standalone-server\/\"},\"wordCount\":585,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/18\/point-in-time-recovery-on-mongodb-standalone-server\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/344.png\",\"keywords\":[\"Database Recovery\",\"Database Recovery Models\",\"MongoDB\",\"MongoDB Log\"],\"articleSection\":[\"MongoDB\",\"NoSQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2018\/08\/18\/point-in-time-recovery-on-mongodb-standalone-server\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/18\/point-in-time-recovery-on-mongodb-standalone-server\/\",\"url\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/18\/point-in-time-recovery-on-mongodb-standalone-server\/\",\"name\":\"Point in time recovery on Mongodb Standalone server. - Database Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/18\/point-in-time-recovery-on-mongodb-standalone-server\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/18\/point-in-time-recovery-on-mongodb-standalone-server\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/344.png\",\"datePublished\":\"2018-08-18T23:52:00+00:00\",\"dateModified\":\"2018-11-11T20:28:56+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/18\/point-in-time-recovery-on-mongodb-standalone-server\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2018\/08\/18\/point-in-time-recovery-on-mongodb-standalone-server\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/18\/point-in-time-recovery-on-mongodb-standalone-server\/#primaryimage\",\"url\":\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/344.png\",\"contentUrl\":\"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/344.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/08\/18\/point-in-time-recovery-on-mongodb-standalone-server\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/dbtut.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Point in time recovery on Mongodb Standalone server.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/dbtut.com\/#website\",\"url\":\"https:\/\/dbtut.com\/\",\"name\":\"Database Tutorials\",\"description\":\"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux\",\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/dbtut.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/dbtut.com\/#organization\",\"name\":\"dbtut\",\"url\":\"https:\/\/dbtut.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"width\":223,\"height\":36,\"caption\":\"dbtut\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/1524185631674ed9ab75aa8ae87bb0d7\",\"name\":\"Rabikumar Singh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/203d6c1d4643b73f5790920242c21a1567d955aee7c832203356242015ccd246?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/203d6c1d4643b73f5790920242c21a1567d955aee7c832203356242015ccd246?s=96&d=mm&r=g\",\"caption\":\"Rabikumar Singh\"},\"url\":\"https:\/\/dbtut.com\/index.php\/author\/rabikumarsingh\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Point in time recovery on Mongodb Standalone server. - Database Tutorials","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/dbtut.com\/index.php\/2018\/08\/18\/point-in-time-recovery-on-mongodb-standalone-server\/","og_locale":"en_US","og_type":"article","og_title":"Point in time recovery on Mongodb Standalone server. - Database Tutorials","og_description":"&nbsp; 1:- Enable oplog\u00a0using &#8211;master option while starting mongod service [Version 3.2]. And\u00a0later version (3.2 +) need to put replSetName=rs0 into the mongo.conf file in replication section. Note :- Version 3.2+ after enabling oplog by putting replica set name into the conf file, Need to take login in mongo and run command rs.intiate() and fire &hellip;","og_url":"https:\/\/dbtut.com\/index.php\/2018\/08\/18\/point-in-time-recovery-on-mongodb-standalone-server\/","og_site_name":"Database Tutorials","article_published_time":"2018-08-18T23:52:00+00:00","article_modified_time":"2018-11-11T20:28:56+00:00","og_image":[{"url":"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/344.png","type":"","width":"","height":""}],"author":"Rabikumar Singh","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Rabikumar Singh","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/18\/point-in-time-recovery-on-mongodb-standalone-server\/#article","isPartOf":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/18\/point-in-time-recovery-on-mongodb-standalone-server\/"},"author":{"name":"Rabikumar Singh","@id":"https:\/\/dbtut.com\/#\/schema\/person\/1524185631674ed9ab75aa8ae87bb0d7"},"headline":"Point in time recovery on Mongodb Standalone server.","datePublished":"2018-08-18T23:52:00+00:00","dateModified":"2018-11-11T20:28:56+00:00","mainEntityOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/18\/point-in-time-recovery-on-mongodb-standalone-server\/"},"wordCount":585,"commentCount":0,"publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/18\/point-in-time-recovery-on-mongodb-standalone-server\/#primaryimage"},"thumbnailUrl":"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/344.png","keywords":["Database Recovery","Database Recovery Models","MongoDB","MongoDB Log"],"articleSection":["MongoDB","NoSQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/dbtut.com\/index.php\/2018\/08\/18\/point-in-time-recovery-on-mongodb-standalone-server\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/18\/point-in-time-recovery-on-mongodb-standalone-server\/","url":"https:\/\/dbtut.com\/index.php\/2018\/08\/18\/point-in-time-recovery-on-mongodb-standalone-server\/","name":"Point in time recovery on Mongodb Standalone server. - Database Tutorials","isPartOf":{"@id":"https:\/\/dbtut.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/18\/point-in-time-recovery-on-mongodb-standalone-server\/#primaryimage"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/18\/point-in-time-recovery-on-mongodb-standalone-server\/#primaryimage"},"thumbnailUrl":"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/344.png","datePublished":"2018-08-18T23:52:00+00:00","dateModified":"2018-11-11T20:28:56+00:00","breadcrumb":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/18\/point-in-time-recovery-on-mongodb-standalone-server\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dbtut.com\/index.php\/2018\/08\/18\/point-in-time-recovery-on-mongodb-standalone-server\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/18\/point-in-time-recovery-on-mongodb-standalone-server\/#primaryimage","url":"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/344.png","contentUrl":"http:\/\/dbtut.com\/wp-content\/uploads\/2018\/08\/344.png"},{"@type":"BreadcrumbList","@id":"https:\/\/dbtut.com\/index.php\/2018\/08\/18\/point-in-time-recovery-on-mongodb-standalone-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dbtut.com\/"},{"@type":"ListItem","position":2,"name":"Point in time recovery on Mongodb Standalone server."}]},{"@type":"WebSite","@id":"https:\/\/dbtut.com\/#website","url":"https:\/\/dbtut.com\/","name":"Database Tutorials","description":"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux","publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dbtut.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/dbtut.com\/#organization","name":"dbtut","url":"https:\/\/dbtut.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","width":223,"height":36,"caption":"dbtut"},"image":{"@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/dbtut.com\/#\/schema\/person\/1524185631674ed9ab75aa8ae87bb0d7","name":"Rabikumar Singh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/203d6c1d4643b73f5790920242c21a1567d955aee7c832203356242015ccd246?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/203d6c1d4643b73f5790920242c21a1567d955aee7c832203356242015ccd246?s=96&d=mm&r=g","caption":"Rabikumar Singh"},"url":"https:\/\/dbtut.com\/index.php\/author\/rabikumarsingh\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/1886","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/users\/114"}],"replies":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/comments?post=1886"}],"version-history":[{"count":0,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/1886\/revisions"}],"wp:attachment":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media?parent=1886"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/categories?post=1886"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/tags?post=1886"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}