{"id":16726,"date":"2020-09-20T20:14:35","date_gmt":"2020-09-20T20:14:35","guid":{"rendered":"https:\/\/dbtut.com\/?p=16726"},"modified":"2020-09-20T20:18:45","modified_gmt":"2020-09-20T20:18:45","slug":"upgrade-mongodb-3-4-to-4-2","status":"publish","type":"post","link":"https:\/\/dbtut.com\/index.php\/2020\/09\/20\/upgrade-mongodb-3-4-to-4-2\/","title":{"rendered":"Upgrade MongoDB 3.4 to 4.2"},"content":{"rendered":"<p>In this article we will upgrade Mongodb 3.4 to 4.2.<\/p>\n<p>MongoDB Upgradation approach will be as follows;<\/p>\n<ol>\n<li>Upgrade Mongodb 3.4 to 3.6<\/li>\n<li>Upgrade Mongodb 3.6 to 4.0<\/li>\n<li>Upgrade Mongodb 4.0 to 4.2<\/li>\n<\/ol>\n<h3>Environments<\/h3>\n<p>We have 3 servers in Replica Set<br \/>\na) 192.168.2.1 (Primary)<br \/>\nb) 192.168.2.2 (Secondary)<br \/>\nc) 192.168.2.3 (Hidden Node)<\/p>\n<h3>Upgrade Mongodb 3.4 to 3.6<\/h3>\n<h4>Step1:<\/h4>\n<p>We will start with hidden node i.e 192.168.2.3<br \/>\na) Shut down the mongod instance on hidden node and replace the 3.4 binary with the 3.6 binary.<br \/>\nb) Restart the node.<br \/>\nThen we will start on Secondary node i.e. 192.168.2.2<br \/>\na) Shut down the mongod instance on Server and replace the 3.4 binary with the 3.6 binary.<br \/>\nb) Restart the node.<\/p>\n<h4>Step2:<\/h4>\n<p>Then we will start on Primary node i.e. 192.168.2.1 and Perfom below steps:<br \/>\na) Initiate rs.stepDown() on Primary (192.168.2.1), through this command 192.168.2.2 will become Primary and 192.168.2.1 will become Secondary.<br \/>\nb) Shut down the mongod instance on Server and replace the 3.4 binary with the 3.6 binary.<br \/>\nc) Restart the node.<\/p>\n<h4>Step3:<\/h4>\n<p>Then we will Enable backward Compatibility via executing below Command on Primary<\/p>\n<pre class=\"lang:default decode:true\">db.adminCommand( { setFeatureCompatibilityVersion: \"3.6\" } )<\/pre>\n<p>Now all nodes will upgrade to 3.6 version in a Replica Set.<\/p>\n<h3>Upgrade Mongodb 3.6 to 4.0<\/h3>\n<p>So before upgrading to MongoDB 4.0 from version 3.6, we have to upgrade the replica Set protocol version from pv0 to pv1 and to do the same we have to execute below set of commands on Primary as pv0 is deprecated from MongoDB 4.0 onward.<\/p>\n<pre class=\"lang:default decode:true\">cfg = rs.conf();\ncfg.protocolVersion=1;\nrs.reconfig(cfg);<\/pre>\n<p>Then we will move forward for upgrading MongoDB ReplicaSet nodes from 3.6 to 4.0 and below will be the steps for same:-<\/p>\n<h4>Step1:<\/h4>\n<p>We will start on upgrade 192.168.2.3<br \/>\na) Shut down the mongod instance on hidden Node and replace the 3.6 binary with the 4.0 binary.<br \/>\nb) Restart the node.<\/p>\n<h4>Step2:<\/h4>\n<p>Then we will start on 192.168.2.1 which will be the Secondary node and We will perform below steps:-<br \/>\na) Shut down the mongod instance on Server and replace the 3.6 binary with the 4.0 binary.<br \/>\nb) Restart the node.<\/p>\n<h4>Step3:<\/h4>\n<p>Then we will start on Primary node 192.168.2.2 and Perfom below steps:-<br \/>\na) Initiate rs.stepDown() on Primary 192.168.2.2, via this command 192.168.2.1 will become Primary and 192.168.2.2 will become Secondary.<br \/>\nb) Shut down the mongod instance on Server and replace the 3.6 binary with the 4.0 binary.<br \/>\nc) Restart the node.<\/p>\n<h4>Step4:<\/h4>\n<p>Then we will Enable backward Compatibility via executing below <strong>Commands on Primary :<\/strong><\/p>\n<pre class=\"lang:default decode:true\">db.adminCommand( { setFeatureCompatibilityVersion: \"4.0\" } )<\/pre>\n<h3>Upgrade Mongodb 4.0 to 4.2<\/h3>\n<p>Then we will move forward for upgrading MongoDB ReplicaSet nodes from MongoDB version 4.0 to 4.2 and below will be the steps for same:-<\/p>\n<h4>Step1:<\/h4>\n<p>We will start upgrade on 192.168.2.3<br \/>\na) Shut down the mongod instance on hidden node and replace the 4.0 binary with the 4.2 binary.<br \/>\nb) Restart the node<\/p>\n<h4>Step2:<\/h4>\n<p>Then we will start upgradation Secondary node 192.168.2.2 and We will perform below steps:-<br \/>\na) Shut down the mongod instance on Server and replace the 4.0 binary with the 4.2 binary.<br \/>\nb) Restart the node.<\/p>\n<h4>Step3:<\/h4>\n<p>Then we will start upgradation Primary node 192.168.2.1 and Perfom below steps:<br \/>\na) Initiate rs.stepDown() on Primary 192.168.2.1, via this command 192.168.2.2 will become Primary and 192.168.2.1 will become Secondary.<br \/>\nb) Shut down the mongod instance on Server and replace the 4.0 binary with the 4.2 binary.<br \/>\nc) Restart the node.<\/p>\n<h4>Step4:<\/h4>\n<p>Then we will Enable backward Compatibility via executing below Commands on Primary :<\/p>\n<pre class=\"lang:default decode:true\">db.adminCommand( { setFeatureCompatibilityVersion: \"4.2\" } )<\/pre>\n<p>Now its completed. I told every steps in this article. You can follows these steps to upgrade mongodb 3.4 to 4.2.<\/p>\n<p>All the nodes are upgraded from MongoDB 3.4 to MongoDB 4.2.<\/p>\n<p>You may want to read below article to install mongodb sharded Cluster;<\/p>\n<p>&#8220;<a href=\"https:\/\/dbtut.com\/index.php\/2019\/11\/08\/deploy-sharded-cluster-with-keyfile-access-control-on-red-hat-enterprise-linux-or-centos-linux\/\" target=\"_blank\" rel=\"noopener noreferrer\">How To Install Mongodb Sharded Cluster with Keyfile Access Control on Red Hat or CentOS<\/a>&#8220;<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_16726\" class=\"pvc_stats all  \" data-element-id=\"16726\" 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>In this article we will upgrade Mongodb 3.4 to 4.2. MongoDB Upgradation approach will be as follows; Upgrade Mongodb 3.4 to 3.6 Upgrade Mongodb 3.6 to 4.0 Upgrade Mongodb 4.0 to 4.2 Environments We have 3 servers in Replica Set a) 192.168.2.1 (Primary) b) 192.168.2.2 (Secondary) c) 192.168.2.3 (Hidden Node) Upgrade Mongodb 3.4 to 3.6 &hellip;<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_16726\" class=\"pvc_stats all  \" data-element-id=\"16726\" 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":527,"featured_media":16791,"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],"tags":[9922,9923,9924],"class_list":["post-16726","post","type-post","status-publish","format-standard","has-post-thumbnail","","category-mongodb","tag-upgrade-mongodb-3-4-to-3-6","tag-upgrade-mongodb-3-6-to-4-0","tag-upgrade-mongodb-4-0-to-4-2"],"aioseo_notices":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>MongoDB ReplicaSet Upgrade from 3.4 to 4.2 version<\/title>\n<meta name=\"description\" content=\"MongoDB ReplicSet Upgrade from 3.4 to 4.2 step by step. First we will upgrade mongodb 3.4 to 3.6,then 3.6 to 4.0, then 4.0 to 4.2\" \/>\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\/2020\/09\/20\/upgrade-mongodb-3-4-to-4-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"MongoDB ReplicaSet Upgrade from 3.4 to 4.2 version\" \/>\n<meta property=\"og:description\" content=\"MongoDB ReplicSet Upgrade from 3.4 to 4.2 step by step. First we will upgrade mongodb 3.4 to 3.6,then 3.6 to 4.0, then 4.0 to 4.2\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dbtut.com\/index.php\/2020\/09\/20\/upgrade-mongodb-3-4-to-4-2\/\" \/>\n<meta property=\"og:site_name\" content=\"Database Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2020-09-20T20:14:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-09-20T20:18:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/09\/mongodbupgrade.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"782\" \/>\n\t<meta property=\"og:image:height\" content=\"438\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Dinesh Chandra Choubey\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Dinesh Chandra Choubey\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/09\/20\/upgrade-mongodb-3-4-to-4-2\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/09\/20\/upgrade-mongodb-3-4-to-4-2\/\"},\"author\":{\"name\":\"Dinesh Chandra Choubey\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/bde533c05b41b496474e6ea804ce28c1\"},\"headline\":\"Upgrade MongoDB 3.4 to 4.2\",\"datePublished\":\"2020-09-20T20:14:35+00:00\",\"dateModified\":\"2020-09-20T20:18:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/09\/20\/upgrade-mongodb-3-4-to-4-2\/\"},\"wordCount\":566,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/09\/20\/upgrade-mongodb-3-4-to-4-2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/09\/mongodbupgrade.jpg\",\"keywords\":[\"Upgrade Mongodb 3.4 to 3.6\",\"Upgrade Mongodb 3.6 to 4.0\",\"Upgrade Mongodb 4.0 to 4.2\"],\"articleSection\":[\"MongoDB\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2020\/09\/20\/upgrade-mongodb-3-4-to-4-2\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/09\/20\/upgrade-mongodb-3-4-to-4-2\/\",\"url\":\"https:\/\/dbtut.com\/index.php\/2020\/09\/20\/upgrade-mongodb-3-4-to-4-2\/\",\"name\":\"MongoDB ReplicaSet Upgrade from 3.4 to 4.2 version\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/09\/20\/upgrade-mongodb-3-4-to-4-2\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/09\/20\/upgrade-mongodb-3-4-to-4-2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/09\/mongodbupgrade.jpg\",\"datePublished\":\"2020-09-20T20:14:35+00:00\",\"dateModified\":\"2020-09-20T20:18:45+00:00\",\"description\":\"MongoDB ReplicSet Upgrade from 3.4 to 4.2 step by step. First we will upgrade mongodb 3.4 to 3.6,then 3.6 to 4.0, then 4.0 to 4.2\",\"breadcrumb\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/09\/20\/upgrade-mongodb-3-4-to-4-2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2020\/09\/20\/upgrade-mongodb-3-4-to-4-2\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/09\/20\/upgrade-mongodb-3-4-to-4-2\/#primaryimage\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/09\/mongodbupgrade.jpg\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/09\/mongodbupgrade.jpg\",\"width\":782,\"height\":438},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/09\/20\/upgrade-mongodb-3-4-to-4-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/dbtut.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Upgrade MongoDB 3.4 to 4.2\"}]},{\"@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\/bde533c05b41b496474e6ea804ce28c1\",\"name\":\"Dinesh Chandra Choubey\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/59a0201c4da99bbe83c10dcf5b17b6da7330aa3add784192c51b1865bd5cff36?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/59a0201c4da99bbe83c10dcf5b17b6da7330aa3add784192c51b1865bd5cff36?s=96&d=mm&r=g\",\"caption\":\"Dinesh Chandra Choubey\"},\"description\":\"I am a Database administrator with an 5+ years. I have hands on experience on MySQL, Mongodb , Cassandra DB's. I have experience about to configure MySQL replication, Database performance Tunning, Mongodb replicaSet configuration, MongoDB Sharding configuration and troubleshooting, Managing, extensive knowledge about MySQL and mongodb backup configuration, Implementation of ProxySQL over MySQL for High Availability.\",\"url\":\"https:\/\/dbtut.com\/index.php\/author\/dineshchoubey\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"MongoDB ReplicaSet Upgrade from 3.4 to 4.2 version","description":"MongoDB ReplicSet Upgrade from 3.4 to 4.2 step by step. First we will upgrade mongodb 3.4 to 3.6,then 3.6 to 4.0, then 4.0 to 4.2","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\/2020\/09\/20\/upgrade-mongodb-3-4-to-4-2\/","og_locale":"en_US","og_type":"article","og_title":"MongoDB ReplicaSet Upgrade from 3.4 to 4.2 version","og_description":"MongoDB ReplicSet Upgrade from 3.4 to 4.2 step by step. First we will upgrade mongodb 3.4 to 3.6,then 3.6 to 4.0, then 4.0 to 4.2","og_url":"https:\/\/dbtut.com\/index.php\/2020\/09\/20\/upgrade-mongodb-3-4-to-4-2\/","og_site_name":"Database Tutorials","article_published_time":"2020-09-20T20:14:35+00:00","article_modified_time":"2020-09-20T20:18:45+00:00","og_image":[{"width":782,"height":438,"url":"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/09\/mongodbupgrade.jpg","type":"image\/jpeg"}],"author":"Dinesh Chandra Choubey","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Dinesh Chandra Choubey","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dbtut.com\/index.php\/2020\/09\/20\/upgrade-mongodb-3-4-to-4-2\/#article","isPartOf":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/09\/20\/upgrade-mongodb-3-4-to-4-2\/"},"author":{"name":"Dinesh Chandra Choubey","@id":"https:\/\/dbtut.com\/#\/schema\/person\/bde533c05b41b496474e6ea804ce28c1"},"headline":"Upgrade MongoDB 3.4 to 4.2","datePublished":"2020-09-20T20:14:35+00:00","dateModified":"2020-09-20T20:18:45+00:00","mainEntityOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/09\/20\/upgrade-mongodb-3-4-to-4-2\/"},"wordCount":566,"commentCount":1,"publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/09\/20\/upgrade-mongodb-3-4-to-4-2\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/09\/mongodbupgrade.jpg","keywords":["Upgrade Mongodb 3.4 to 3.6","Upgrade Mongodb 3.6 to 4.0","Upgrade Mongodb 4.0 to 4.2"],"articleSection":["MongoDB"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/dbtut.com\/index.php\/2020\/09\/20\/upgrade-mongodb-3-4-to-4-2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/dbtut.com\/index.php\/2020\/09\/20\/upgrade-mongodb-3-4-to-4-2\/","url":"https:\/\/dbtut.com\/index.php\/2020\/09\/20\/upgrade-mongodb-3-4-to-4-2\/","name":"MongoDB ReplicaSet Upgrade from 3.4 to 4.2 version","isPartOf":{"@id":"https:\/\/dbtut.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/09\/20\/upgrade-mongodb-3-4-to-4-2\/#primaryimage"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/09\/20\/upgrade-mongodb-3-4-to-4-2\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/09\/mongodbupgrade.jpg","datePublished":"2020-09-20T20:14:35+00:00","dateModified":"2020-09-20T20:18:45+00:00","description":"MongoDB ReplicSet Upgrade from 3.4 to 4.2 step by step. First we will upgrade mongodb 3.4 to 3.6,then 3.6 to 4.0, then 4.0 to 4.2","breadcrumb":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/09\/20\/upgrade-mongodb-3-4-to-4-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dbtut.com\/index.php\/2020\/09\/20\/upgrade-mongodb-3-4-to-4-2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/index.php\/2020\/09\/20\/upgrade-mongodb-3-4-to-4-2\/#primaryimage","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/09\/mongodbupgrade.jpg","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/09\/mongodbupgrade.jpg","width":782,"height":438},{"@type":"BreadcrumbList","@id":"https:\/\/dbtut.com\/index.php\/2020\/09\/20\/upgrade-mongodb-3-4-to-4-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dbtut.com\/"},{"@type":"ListItem","position":2,"name":"Upgrade MongoDB 3.4 to 4.2"}]},{"@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\/bde533c05b41b496474e6ea804ce28c1","name":"Dinesh Chandra Choubey","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/59a0201c4da99bbe83c10dcf5b17b6da7330aa3add784192c51b1865bd5cff36?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/59a0201c4da99bbe83c10dcf5b17b6da7330aa3add784192c51b1865bd5cff36?s=96&d=mm&r=g","caption":"Dinesh Chandra Choubey"},"description":"I am a Database administrator with an 5+ years. I have hands on experience on MySQL, Mongodb , Cassandra DB's. I have experience about to configure MySQL replication, Database performance Tunning, Mongodb replicaSet configuration, MongoDB Sharding configuration and troubleshooting, Managing, extensive knowledge about MySQL and mongodb backup configuration, Implementation of ProxySQL over MySQL for High Availability.","url":"https:\/\/dbtut.com\/index.php\/author\/dineshchoubey\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/16726","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\/527"}],"replies":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/comments?post=16726"}],"version-history":[{"count":0,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/16726\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media\/16791"}],"wp:attachment":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media?parent=16726"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/categories?post=16726"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/tags?post=16726"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}