{"id":30062,"date":"2022-12-23T20:59:58","date_gmt":"2023-09-28T17:01:26","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%86mongodb3-2%e5%8d%87%e7%ba%a7%e5%88%b03-4%e7%9a%84%e5%b7%a5%e4%bd%9c\/"},"modified":"2025-08-12T17:21:00","modified_gmt":"2025-08-12T09:21:00","slug":"%e5%b0%86mongodb3-2%e5%8d%87%e7%ba%a7%e5%88%b03-4%e7%9a%84%e5%b7%a5%e4%bd%9c","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%86mongodb3-2%e5%8d%87%e7%ba%a7%e5%88%b03-4%e7%9a%84%e5%b7%a5%e4%bd%9c\/","title":{"rendered":"\u5c06MongoDB3.2\u5347\u7ea7\u52303.4\u7684\u5de5\u4f5c"},"content":{"rendered":"<p>QualiArts Advent Calendar 2019 15\u65e5\u76ee\u62c5\u5f53\u306e @tnbe21 \u3067\u3059\u3002<br \/>\n\u666e\u6bb5\u306fNode.js\u3067\u30b2\u30fc\u30e0\u6a5f\u80fd\u3084LP\u306e\u30b5\u30fc\u30d0\u5074\u5b9f\u88c5\u3084\u30b3\u30fc\u30c9\u30ec\u30d3\u30e5\u30fc\u3092\u884c\u3063\u305f\u308a<br \/>\n\u30a4\u30f3\u30d5\u30e9(ansible\u3068\u304bterraform\u3001fabric\u306a\u3069IaC\u3084GCP\u3001Jenkins\u3068\u304b)\u306e\u4fdd\u5b88\u3001<br \/>\nCS\u5bfe\u5fdc\u3001Python\u3068\u304bHiveQL\u3068\u304b\u3067\u66f8\u3044\u3066\u3042\u308b\u884c\u52d5\u30ed\u30b0\u96c6\u8a08\u30d0\u30c3\u30c1\u306e\u4fdd\u5b88\u306a\u3069\u3001<br \/>\n\u3042\u308b\u30b2\u30fc\u30e0\u306e\u30b5\u30fc\u30d0\u30fc\u30b5\u30a4\u30c9\u306e\u30a8\u30f3\u30b8\u30cb\u30a2\u30ea\u30f3\u30b0\u5168\u822c\u3092\u4e3b\u306b\u62c5\u5f53\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h1>\u9996\u5148<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d05bb37434c4406bd9fb2\/2-0.png\" alt=\"mcm_01_top.png\" \/><\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">MCM\u3067\u4e3b\u306b\u6d3b\u7528\u3055\u308c\u3066\u3044\u308b\u306e\u306f\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u6a5f\u80fd\u306e\u307f\u3067\u3001<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30af\u30e9\u30b9\u30bf\u7ba1\u7406\u3084\u5404\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u306a\u3069<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30d5\u30eb\u30de\u30cd\u30fc\u30b8\u30c9\u3055\u308c\u3066\u3044\u308b\u72b6\u614b\u306b\u3057\u305f\u3044<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">3.2\u7cfb\u306eEndOfLife\u306f\u6628\u5e74\u306e9\u6708\u3001\u6b21\u306e3.4\u7cfb\u306f\u6765\u5e74\u306e1\u6708\u306a\u306e\u3067\u3001<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u6050\u3089\u304fMCM\u30d5\u30eb\u30de\u30cd\u30fc\u30b8\u30c9\u74b0\u5883\u30673.4\u306b\u51fa\u6765\u308b\u30c7\u30c3\u30c9\u30e9\u30a4\u30f3\u304c\u6765\u5e74\u306e1\u6708<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">(2\u6708\u4ee5\u964d\u306f\u3044\u3064\u307e\u30673.4\u3067\u69cb\u7bc9\u3067\u304d\u308b\u304b\u308f\u304b\u3089\u306a\u3044)<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">-&gt; \u98db\u3073\u7d1a\u3067\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b\u306e\u306f\u30ea\u30b9\u30ad\u30fc\u306a\u306e\u3067<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u3072\u3068\u3064\u4e0a\u306e3.4\u3078\u6765\u5e74\u306e1\u6708\u307e\u3067\u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u305f\u3044<\/ul>\n<p>\u3053\u306e2\u70b9\u3092\u8e0f\u307e\u3048\u6765\u5e741\u6708\u3092\u30c7\u30c3\u30c9\u30e9\u30a4\u30f3\u3068\u3057\u3066<br \/>\nMCM\u30d5\u30eb\u30de\u30cd\u30fc\u30b8\u30c9\u306a3.4\u3078\u30ea\u30cb\u30e5\u30fc\u30a2\u30eb\u3059\u308b\u305f\u3081\u306e\u6e96\u5099\u3092\u3057\u3066\u304d\u307e\u3057\u305f\u3002<br \/>\n\u30b9\u30c6\u30fc\u30b8\u30f3\u30b0\u74b0\u5883\u306e\u30ea\u30cb\u30e5\u30fc\u30a2\u30eb(=\u672c\u756a\u74b0\u5883\u30ea\u30cb\u30e5\u30fc\u30a2\u30eb\u306e\u30ea\u30cf\u30fc\u30b5\u30eb)\u3084<br \/>\n\u305d\u306e\u969b\u306e\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u3082\u52a0\u3048\u305f\u624b\u9806\u66f8\u306e\u4f5c\u6210\u3084\u6e96\u5099\u306f\u5b8c\u4e86\u3057\u3066\u304a\u308a\u3001<br \/>\n\u3042\u3068\u306f\u672c\u756a\u74b0\u5883\u306e\u30ea\u30cb\u30e5\u30fc\u30a2\u30eb\u3092\u5f85\u3064\u3060\u3051\u306e\u72b6\u6cc1\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n\u305d\u306e\u8a66\u884c\u932f\u8aa4\u306e\u904e\u7a0b\u3067\u5f97\u3089\u308c\u305f\u77e5\u898b\u3092\u304a\u8a71\u3057\u3057\u307e\u3059\u3002<\/p>\n<h1>\u6b65\u9aa4<\/p>\n<h2>\u521b\u5efa\u65b0\u7684\u7fa4\u96c6\u6211\u4eec\u6709\u4e24\u79cd\u9009\u62e9\uff1a\u8981\u4e48\u66f4\u65b0\u73b0\u6709\u7684\u96c6\u7fa4\uff0c\u8981\u4e48\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u96c6\u7fa4\u5e76\u8fc1\u79fb\u6570\u636e\u3002\u7136\u800c\uff0c\u4ece3.4\u7248\u672c\u5f00\u59cb\uff0c\u9700\u8981\u5c06mongoc\u7684\u914d\u7f6e\u4eceSCCC\u6a21\u5f0f\u66f4\u6539\u4e3aCSRS\u6a21\u5f0f\u4ee5\u4fdd\u5b58\u96c6\u7fa4\u7684\u5143\u6570\u636e\u4fe1\u606f\u3002\u800c\u4e14\uff0c\u5982\u679c\u5e0c\u671b\u5c06\u5176\u653e\u5728MCM\u7ba1\u7406\u4e0b\uff0c\u540e\u7eed\u6b65\u9aa4\u53ef\u80fd\u4f1a\u53d8\u5f97\u590d\u6742\u3002\u56e0\u6b64\uff0c\u6211\u4eec\u51b3\u5b9a\u91c7\u53d6\u521b\u5efa\u65b0\u7684\u96c6\u7fa4\u5e76\u8fc1\u79fb\u6570\u636e\u7684\u65b9\u6cd5\u3002\u6211\u4eec\u5c06\u51c6\u5907\u4e00\u4e2a\u65b0\u7684GCE\u5b9e\u4f8b\uff0c\u5e76\u5b89\u88c5MCM\u4ee3\u7406\uff0c\u7136\u540e\u5728\u5168\u65b0\u76843.4\u7cfb\u5217\u4e0a\u8fd0\u884c\u96c6\u7fa4\u3002<\/p>\n<h2>\u8003\u8651\u6570\u636e\u8fc1\u79fb\u7684\u65b9\u6cd5\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u8003\u8651\u6570\u636e\u8fc1\u79fb\u7684\u65b9\u6cd5\u3002<br \/>\n\u867d\u7136\u5728MCM\u4e0a\u8fdb\u884c\u4e86\u5907\u4efd\uff0c\u4f46\u73b0\u72b6\u4ecd\u9700\u8981\u8fdb\u884c\u6570\u636e\u8fc1\u79fb\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u5148\u8ff0\u306e\u901a\u308amongoc\u304c3.4\u4ee5\u964d\u672a\u5bfe\u5fdc\u306eSCCC\u578b\u3060\u3063\u305f\u308a\u3001<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">mongoc\u306eDB(\u30e1\u30bf\u60c5\u5831DB)\u3084\u5b9f\u30c7\u30fc\u30bfRS\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u304c\u5225\u308c\u3066\u7ba1\u7406\u3055\u308c\u3066\u3044\u305f\u95a2\u4fc2\u304b<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">MCM\u30b3\u30f3\u30bd\u30fc\u30eb\u4e0a\u304b\u3089\u65b0\u898f\u30af\u30e9\u30b9\u30bf\u3078\u76f4\u63a5\u30ea\u30b9\u30c8\u30a2\u3059\u308b\u3053\u3068\u304c\u4e0d\u53ef\u80fd<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">(-&gt; \u3060\u3063\u305f?\u6700\u8fd1\u30b3\u30f3\u30bd\u30fc\u30eb\u3092\u95b2\u89a7\u3057\u3066\u307f\u305f\u3089\u53ef\u80fd\u305d\u3046\u3060\u3063\u305f\u304b\u3082?\u5225\u306e\u65b9\u6cd5\u3067\u306e\u624b\u9806\u304c\u56fa\u307e\u3063\u3066\u3057\u307e\u3063\u305f\u306e\u3067\u672a\u691c\u8a3c)<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u5404RS\u3084\u8a2d\u5b9aDB\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u30ea\u30b9\u30c8\u30a2\u3059\u308b\u65b9\u6cd5\u3082\u96e3\u3057\u3044<\/ul>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d05bb37434c4406bd9fb2\/11-1.png\" alt=\"mongodb_migration_by_mcm.png\" \/><\/p>\n<h2>\u503e\u5012\u8f66\u5728\u8fc1\u79fb\u670d\u52a1\u5668\u4e0a\uff0c\u4f7f\u7528\u73b0\u6709\u96c6\u7fa4\u4f5c\u4e3a\u8fde\u63a5\u76ee\u6807\u6765\u542f\u52a8mongos\uff0c\u5e76\u6267\u884cmongodump\u64cd\u4f5c\u3002<br \/>\n\u867d\u7136\u4e24\u8005\u90fd\u5f88\u7b80\u5355\uff0c\u4f46\u4e3a\u4e86\u9884\u9632\u53ef\u80fd\u9047\u5230\u7684\u9677\u9631\uff0c\u9700\u8981\u63d0\u9192\u7684\u662f\uff0c<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">1\u5ea6\u3067\u30c0\u30f3\u30d7\u30c7\u30fc\u30bf\u304c\u30c7\u30a3\u30b9\u30af\u306e\u534a\u5206\u4ee5\u4e0a\u3092\u5c02\u6709\u3057\u3001<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">2\u5ea63\u5ea6\u3068\u8a66\u3059\u6a5f\u4f1a\u304c\u3042\u3063\u305f\u306e\u3067\u30c0\u30f3\u30d7\u306e\u90fd\u5ea6\u904e\u53bb\u306e\u30c7\u30fc\u30bf\u524a\u9664\u3092\u3057\u3066\u3044\u307e\u3057\u305f<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30c7\u30a3\u30b9\u30af\u30d5\u30eb\u306b\u306a\u308a\u305d\u3046\u306b\u306a\u308b\u3068\u9014\u4e2d\u3067\u6b62\u307e\u308a\u307e\u3059<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u6307\u5b9a\u3057\u3066\u5b9f\u884c(configDB\u306e\u30c0\u30f3\u30d7\u306f\u4e0d\u8981)<\/ul>\n<pre class=\"post-pre\"><code><span class=\"nb\">nohup <\/span>mongodump <span class=\"nt\">--db<\/span> <span class=\"o\">{<\/span>DB\u540d<span class=\"o\">}<\/span> <span class=\"nt\">--out<\/span> \/data\/mongodb\/backup_<span class=\"sb\">`<\/span><span class=\"nb\">date<\/span> +%Y%m%d%H%M<span class=\"sb\">`<\/span> <span class=\"o\">&gt;<\/span>\r\n\/data\/mongodb\/logs\/dump_<span class=\"sb\">`<\/span><span class=\"nb\">date<\/span> +%Y%m%d%H%M<span class=\"sb\">`<\/span>.log &amp;\r\n<\/code><\/pre>\n<h2>\u5728\u65b0\u7684\u96c6\u7fa4\u4e2d\u4e3a\u6bcf\u4e2a\u96c6\u5408\u521b\u5efa\u7d22\u5f15\u548c\u5206\u7247\u952e\u3002\u63a5\u4e0b\u6765\uff0c\u91cd\u65b0\u542f\u52a8mongos\u4ee5\u9762\u5411\u65b0\u7684\u96c6\u7fa4\uff0c\u5e76\u9884\u5148\u521b\u5efa\u76ee\u6807\u96c6\u5408\u7684\u7d22\u5f15\u548c\u5206\u7247\u952e\u3002<\/p>\n<h2>\u6062\u590d\u5728\u6267\u884cmongorestore\u4e4b\u524d\uff0c\u8bf7\u786e\u4fddmongos\u6b63\u5728\u65b0\u5efa\u96c6\u7fa4\u8fdb\u884c\u542f\u52a8\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"nb\">nohup <\/span>mongorestore <span class=\"nt\">-v<\/span> <span class=\"nt\">--writeConcern<\/span> 1 <span class=\"nt\">--numInsertionWorkersPerCollection<\/span> 8 <span class=\"nt\">--db<\/span> <span class=\"o\">{<\/span>DB\u540d<span class=\"o\">}<\/span> \/data\/mongodb\/backup_<span class=\"o\">{<\/span>yyyymmddhhmm<span class=\"o\">}<\/span>\/<span class=\"o\">{<\/span>DB\u540d<span class=\"o\">}<\/span> <span class=\"o\">&gt;<\/span> \/data\/mongodb\/logs\/restore_<span class=\"sb\">`<\/span><span class=\"nb\">date<\/span>\r\n+%Y%m%d%H%M<span class=\"sb\">`<\/span>.log &amp;\r\n<\/code><\/pre>\n<p>\u6211\u6700\u521d\u4f7f\u7528\u7684\u8fc1\u79fb\u670d\u52a1\u5668\u662fn1-standard-1\uff0c\u6ca1\u6709\u6307\u5b9anumInsertionWorkersPerCollection\u6216writeConcern\u9009\u9879\u8fdb\u884c\u6267\u884c\uff0c\u82b1\u8d39\u4e86\u5927\u7ea63\u4e2a\u534a\u5c0f\u65f6\u3002\u4f46\u662f\uff0c\u5728\u9605\u8bfb\u4e86grep Tips\u5148\u751f\u7684\u6587\u7ae0\u540e\uff0c\u6211\u5c06\u673a\u5668\u89c4\u683c\u66f4\u6539\u4e3an1-standard-8\uff088\u6838\uff09\uff0c\u5e76\u8bbe\u7f6e\u4e86\u8fd9\u4e9b\u9009\u9879\u3002\u5728\u9884\u5148\u521b\u5efa\u4e86\u5757\u4fe1\u606f\u7684\u60c5\u51b5\u4e0b\u6267\u884c\uff0c\u6587\u6863\u5220\u9664+\u6062\u590d\u7684\u65f6\u95f4\u7f29\u77ed\u4e861\u5c0f\u65f6\u548c7\u5206\u4e4b2\u3002\u8fd9\u7bc7\u6587\u7ae0\u662f\u8ffd\u6eaf\u3002<\/p>\n<p>&#8211;numInsertionWorkersPerCollection: \u5404\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u306binsert\u3059\u308b\u30ef\u30fc\u30ab\u6570\u306e\u6307\u5b9a<br \/>\n\u30c7\u30d5\u30a9\u30eb\u30c8\u306f1\u3067\u3001CPU\u30b3\u30a2\u6570\u8fba\u308a\u307e\u3067\u306e\u6307\u5b9a\u3067\u30ea\u30b9\u30c8\u30a2\u306e\u9ad8\u901f\u5316\u304c\u898b\u8fbc\u3081\u307e\u3059<\/p>\n<p>&#8211;writeConcern: writeConcern \u306e\u6307\u5b9a<br \/>\n\u30c7\u30d5\u30a9\u30eb\u30c8\u306fmajority = \u6240\u5b9a\u30ec\u30d7\u30ea\u30ab\u30bb\u30c3\u30c8\u3067\u6295\u7968\u6a29\u3092\u3082\u3064\u30e1\u30f3\u30d0\u306e\u534a\u6570\u4ee5\u4e0a\u304c<br \/>\n\u66f8\u304d\u8fbc\u307f\u3055\u308c\u305f\u3068\u307f\u306a\u3055\u308c\u306a\u3044\u3068\u6b21\u306einsert\u306b\u9032\u307f\u307e\u305b\u3093<br \/>\n1\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u30d7\u30e9\u30a4\u30de\u30ea\u30e1\u30f3\u30d0\u306b\u66f8\u304d\u8fbc\u307e\u308c\u305f\u6642\u70b9\u3067\u6b21\u306einsert\u306b\u9032\u307f\u3001<br \/>\n\u30c7\u30d5\u30a9\u30eb\u30c8\u3088\u308a\u9ad8\u901f\u5316\u3055\u308c\u308b\u898b\u8fbc\u307f\u3067\u3059<br \/>\n\u30ea\u30b9\u30c8\u30a2\u51e6\u7406\u4ee5\u5916\u3067\u306e\u5404\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u3078\u306e\u66f8\u304d\u8fbc\u307f\u304c\u306a\u3044\u72b6\u614b\u306e\u62c5\u4fdd\u306f\u5fc5\u8981\u3067\u3059<\/p>\n<p>\u8003\u8651\u5230\u91d1\u94b1\u6210\u672c\u7684\u6743\u8861\uff0c\u5728\u589e\u52a0CPU\u6838\u5fc3\u6570\u91cf\u548c\u63d0\u9ad8\u5e76\u884c\u6267\u884c\u6570\u7684\u9009\u62e9\u4e0a\uff0c\u6211\u8ba4\u4e3a\u53ef\u4ee5\u5728\u4e00\u5b9a\u7a0b\u5ea6\u4e0a\u7f29\u77ed\u6062\u590d\u65f6\u95f4\u3002<\/p>\n<h2>\u4e3a\u521b\u5efa\u5757\u4fe1\u606f\u8fdb\u884c\u9884\u6267\u884c\u3002\u6839\u636eNullPointer&#8217;s\u7684\u6587\u7ae0\u6240\u8ff0\uff0c<br \/>\n\u9884\u5148\u6267\u884c\u8fd9\u4e9b\u64cd\u4f5c\u5e76\u63d0\u524d\u521b\u5efa\u533a\u5757\u4fe1\u606f\u3002<br \/>\n\u4f3c\u4e4e\u901a\u8fc7\u5728\u8fd9\u9879\u5de5\u4f5c\u4e4b\u524d\u63d0\u524d\u6267\u884c\u4e00\u6b21\uff0c\u53ef\u4ee5\u51cf\u5c11\u6062\u590d\u6240\u9700\u7684\u65f6\u95f4\u3002<\/p>\n<h1>This execution<br \/>\n\u5728\u6267\u884cmongorestore\u7684\u8fc7\u7a0b\u4e2d\uff0c\u9700\u8981\u6ce8\u610f\u4ece\u9884\u5148\u6267\u884c\u7684\u72b6\u6001\u5230\u5b9e\u9645\u6267\u884c\u7684\u8fc7\u7a0b\u4e2d\uff0c\u9700\u8981\u5220\u9664\u6240\u6709\u6587\u6863\uff0c\u5e76\u8fdb\u884c\u63d2\u5165\u64cd\u4f5c\u3002<\/p>\n<p>\u4e0d\u662f\u5220\u9664\u96c6\u5408\uff0c\u800c\u662f\u5220\u9664\u6587\u6863\u3002<\/p>\n<p>mongorestore\u547d\u4ee4\u6709\u4e00\u4e2a&#8211;drop\u9009\u9879\uff0c\u53ef\u4ee5\u5728\u6062\u590d\u6570\u636e\u65f6\u5220\u9664\u5df2\u6709\u7684\u6587\u6863\uff0c\u4f46\u662f\u6211\u6ca1\u6709\u6307\u5b9a\u8fd9\u4e2a\u9009\u9879\u3002\u53ef\u80fd\u662f\u56e0\u4e3a\u5b83\u4f1a\u5220\u9664\u6574\u4e2a\u96c6\u5408\u800c\u4e0d\u4ec5\u4ec5\u662f\u6587\u6863\u3002<br \/>\n\u5c3d\u7ba1\u6587\u5b57\u4e0a\u660e\u786e\u5199\u7740&#8221;drop&#8221;\uff0c\u65e0\u8bba\u591a\u5c11\u6b21\u770b\u90fd\u6ca1\u6ce8\u610f\u5230\uff0c\u771f\u662f\u611f\u89c9\u6709\u4e9b\u9a6c\u864e\u3002<br \/>\n\u7d22\u5f15\u4f1a\u6839\u636emongodump\u751f\u6210\u7684\u5907\u4efd\u6570\u636e\u5728\u6062\u590d\u65f6\u91cd\u65b0\u8bbe\u7f6e\uff0c\u4f46\u662f\u5206\u7247\u952e\u548c\u5206\u5757\u4fe1\u606f\u4f1a\u4e22\u5931\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"c\">#!\/bin\/sh<\/span>\r\n\r\n<span class=\"nv\">SCRIPT_NAME<\/span><span class=\"o\">=<\/span>remove_<span class=\"sb\">`<\/span><span class=\"nb\">date<\/span> +%Y%m%d%H%M<span class=\"sb\">`<\/span>.js\r\n<span class=\"nb\">cat<\/span> <span class=\"o\">&gt;<\/span> <span class=\"nv\">$SCRIPT_NAME<\/span> <span class=\"o\">&lt;&lt;<\/span> <span class=\"no\">EOF<\/span><span class=\"sh\">\r\nfunction padZero(v) {\r\n  return v &lt; 10 ? '0' + v : v;\r\n}\r\n\r\nfunction getDt() {\r\n  var date = new Date();\r\n  var ymd = [date.getFullYear(), padZero(date.getMonth() + 1), padZero(date.getDate())];\r\n  var time = [padZero(date.getHours()), padZero(date.getMinutes()), padZero(date.getSeconds())];\r\n  return ymd.join('-') + 'T' + time.join(':');\r\n}\r\n\r\nvar cols = db.getCollectionNames();\r\nfor (var i = 0; i &lt; cols.length; i++) {\r\n  var col = cols[i];\r\n  print(getDt() + ': ' + 'remove ' + col);\r\n  db[col].remove({});\r\n  print(getDt() + ': ' + 'finished removing ' + col);\r\n}\r\n<\/span><span class=\"no\">EOF\r\n\r\n<\/span>mongo <span class=\"o\">{<\/span>db\u540d<span class=\"o\">}<\/span> <span class=\"nv\">$SCRIPT_NAME<\/span>\r\n<span class=\"nb\">rm<\/span> <span class=\"nv\">$SCRIPT_NAME<\/span>\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code><span class=\"nb\">nohup <\/span>sh remove.sh <span class=\"o\">&gt;<\/span> \/data\/mongodb\/logs\/remove_<span class=\"sb\">`<\/span><span class=\"nb\">date<\/span> +%Y%m%d%H%M<span class=\"sb\">`<\/span>.log &amp;\r\n<\/code><\/pre>\n<p>\u4e3a\u4e86\u505c\u6b62\u8fdb\u884c\u5757\u8fc1\u79fb\u5e76\u5728\u5173\u95ed\u5e73\u8861\u5668\u7684\u60c5\u51b5\u4e0b\uff0c\u6267\u884c\u7c7b\u4f3c\u4ee5\u4e0b\u7684\u811a\u672c\uff0c\u5148\u5220\u9664\u6587\u6863\uff08\u6bd4\u5220\u9664\u540e\u518ddrop\u82b1\u8d39\u66f4\u591a\u65f6\u95f4\uff09\uff0c\u7136\u540e\u6267\u884cmongorestore without &#8211;drop\u3002<\/p>\n<h2>\u6bd4\u8f83\u6536\u85cf\u54c1\u6570\u91cf\u5728\u5b8c\u6210\u8fd8\u539f\u540e\uff0c\u5c3d\u7ba1\u65e0\u6cd5\u786e\u8ba4\u65b0\u65e7\u96c6\u7fa4\u4e2d\u6240\u6709\u6587\u6863\u7684\u503c\u662f\u5426\u4e00\u81f4\uff0c\u4f46\u81f3\u5c11\u53ef\u4ee5\u68c0\u67e5\u6587\u6863\u7684\u6570\u91cf\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"nx\">db<\/span><span class=\"p\">.<\/span><span class=\"nx\">collection<\/span><span class=\"p\">.<\/span><span class=\"nx\">aggregate<\/span><span class=\"p\">([<\/span>\r\n  <span class=\"p\">{<\/span> <span class=\"na\">$group<\/span><span class=\"p\">:<\/span> <span class=\"p\">{<\/span> <span class=\"na\">_id<\/span><span class=\"p\">:<\/span> <span class=\"kc\">null<\/span><span class=\"p\">,<\/span> <span class=\"na\">count<\/span><span class=\"p\">:<\/span> <span class=\"p\">{<\/span> <span class=\"na\">$sum<\/span><span class=\"p\">:<\/span> <span class=\"mi\">1<\/span> <span class=\"p\">}<\/span> <span class=\"p\">}<\/span> <span class=\"p\">}<\/span>\r\n<span class=\"p\">]);<\/span>\r\n<\/code><\/pre>\n<p>\u8fdb\u884c\u7ed3\u679c\u6bd4\u8f83\u3002<br \/>\n\u867d\u7136\u6709\u66f4\u7b80\u5355\u7684\u547d\u4ee4 db.collection.count();\uff0c\u4f46\u5728\u5206\u7247\u7fa4\u96c6\u73af\u5883\u4e2d\uff0c<br \/>\n\u5728\u8fdb\u884c\u5206\u7247\u8fc1\u79fb\u65f6\u53ef\u80fd\u4f1a\u5931\u8d25\u5e76\u4e14\u8fde\u540c\u7fa4\u96c6\u7ba1\u7406\u4e0b\u7684\u5b64\u7acb\u6587\u6863(\u5b64\u5152\u6587\u4ef6)\u4e00\u540c\u8ba1\u6570\uff0c<br \/>\n\u56e0\u6b64\u53ef\u80fd\u65e0\u6cd5\u83b7\u53d6\u51c6\u786e\u7684\u6570\u91cf\u3002\u636e\u8bf4\u91c7\u7528\u805a\u5408\u65b9\u5f0f\u8fdb\u884c\u4e0a\u8ff0\u67e5\u8be2\u53ef\u4ee5\u66f4\u51c6\u786e\u3002<\/p>\n<h1>\u603b\u7ed3\u548c\u611f\u60f3<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">mongoc\u304cSCCC\u578b\u3068\u306a\u3063\u3066\u3044\u308b3.2\u30af\u30e9\u30b9\u30bf\u30923.4\u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b\u95a2\u4fc2\u3067\u3001<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">MCM\u7ba1\u7406\u4e0b\u3067\u65b0\u898f\u30af\u30e9\u30b9\u30bf\u3092\u4f5c\u6210\u3057\u3066<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u79fb\u884c\u30b5\u30fc\u30d0\u7d4c\u7531\u3067mongodump -&gt; mongorestore\u3059\u308b\u624b\u9806\u3092\u3068\u308b\u3053\u3068\u306b\u3057\u305f<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">mongorestore\u306f\u30aa\u30d7\u30b7\u30e7\u30f3\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3001\u30b5\u30fc\u30d0\u306e\u30b9\u30b1\u30fc\u30eb\u30a2\u30c3\u30d7\u3067\u9ad8\u901f\u5316\u3067\u304d\u308b<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u3055\u3089\u306a\u308b\u30ea\u30b9\u30c8\u30a2\u9ad8\u901f\u5316\u306e\u305f\u3081\u306b\u4e8b\u524d\u306e\u30ea\u30b9\u30c8\u30a2\u3092\u5b9f\u65bd<\/ul>\n<\/li>\n<\/ul>\n<p>\u672c\u79fb\u884c\u6642\u306erestore\u3067\u306f&#8211;drop\u306f\u6307\u5b9a\u305b\u305a\u3001<br \/>\n\u5168\u30b3\u30ec\u30af\u30b7\u30e7\u30f3 db.collection.remove({}); \u3092\u3057\u3066\u304b\u3089\u5b9f\u884c\u3059\u308b<br \/>\n\u4e8b\u524d\u306e\u30ea\u30cf\u30fc\u30b5\u30eb\u3068\u624b\u9806\u66f8\u306e\u4f5c\u6210\u306f\u672c\u5f53\u306b\u5927\u4e8b<\/p>\n<p>\u867d\u7136\u5728\u6574\u4e2a\u6570\u636e\u8fc1\u79fb\u8fc7\u7a0b\u4e2d\u627f\u53d7\u4e86\u76f8\u5f53\u5927\u7684\u538b\u529b\uff0c\u4f46\u901a\u8fc7\u8fd9\u4e2a\u8fc7\u7a0b\u6211\u5f97\u4ee5\u6df1\u5165\u5b66\u4e60MongoDB\uff0c\u5e76\u611f\u5230\u975e\u5e38\u6709\u8da3\u3002<\/p>\n<h1>\u53ef\u4ee5\u53c2\u8003\u5728\u6062\u590dMongoDB\u96c6\u7fa4\u65f6\u7684\u52a0\u901f\u6280\u5de7\uff1a<br \/>\n<iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" title=\"mongoDB\u30af\u30e9\u30b9\u30bf\u306brestore\u3059\u308b\u6642\u306e\u9ad8\u901f\u5316\u30c6\u30af\u30cb\u30c3\u30af - NullPointer&#039;s\" src=\"https:\/\/hatenablog-parts.com\/embed?url=https%3A%2F%2Fpaulownia.hatenablog.com%2Fentry%2F2018%2F02%2F05%2F010704#?secret=Xt6d3gw818\" data-secret=\"Xt6d3gw818\" scrolling=\"no\" frameborder=\"0\"><\/iframe><\/p>\n<p>\u4f18\u5316mongorestore\u901f\u5ea6<br \/>\nhttps:\/\/www.greptips.com\/posts\/1261\/<\/p>\n<p>MongoDB \u624b\u518c<br \/>\nhttps:\/\/docs.mongodb.com\/manual\/reference\/program\/mongodump<br \/>\nhttps:\/\/docs.mongodb.com\/manual\/reference\/program\/mongorestore<br \/>\nhttps:\/\/docs.mongodb.com\/manual\/reference\/write-concern<br \/>\nhttps:\/\/docs.mongodb.com\/manual\/tutorial\/manage-sharded-cluster-balancer<br \/>\n\u4ee5\u53ca\u5176\u4ed6\u4f17\u591a\u8d44\u6599\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>QualiArts Advent Calendar 2019 15\u65e5\u76ee\u62c5\u5f53\u306e @tnbe21 \u3067\u3059\u3002 \u666e\u6bb5\u306fN [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[227],"class_list":["post-30062","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-227"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5c06MongoDB3.2\u5347\u7ea7\u52303.4\u7684\u5de5\u4f5c - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"\u5173\u4e8e\u5c06MongoDB3.2\u5347\u7ea7\u52303.4\u7684\u5de5\u4f5c\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5c06mongodb3-2\u5347\u7ea7\u52303-4\u7684\u5de5\u4f5c\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5c06MongoDB3.2\u5347\u7ea7\u52303.4\u7684\u5de5\u4f5c\" \/>\n<meta property=\"og:description\" content=\"\u5173\u4e8e\u5c06MongoDB3.2\u5347\u7ea7\u52303.4\u7684\u5de5\u4f5c\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5c06mongodb3-2\u5347\u7ea7\u52303-4\u7684\u5de5\u4f5c\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-09-28T17:01:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-12T09:21:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d05bb37434c4406bd9fb2\/2-0.png\" \/>\n<meta name=\"author\" content=\"\u97f5, \u79d1\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u97f5, \u79d1\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%86mongodb3-2%e5%8d%87%e7%ba%a7%e5%88%b03-4%e7%9a%84%e5%b7%a5%e4%bd%9c\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%86mongodb3-2%e5%8d%87%e7%ba%a7%e5%88%b03-4%e7%9a%84%e5%b7%a5%e4%bd%9c\/\",\"name\":\"\u5c06MongoDB3.2\u5347\u7ea7\u52303.4\u7684\u5de5\u4f5c - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-09-28T17:01:26+00:00\",\"dateModified\":\"2025-08-12T09:21:00+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/6530331a63adef3b3443a1fab53a0e6e\"},\"description\":\"\u5173\u4e8e\u5c06MongoDB3.2\u5347\u7ea7\u52303.4\u7684\u5de5\u4f5c\u7684\u6280\u672f\u6587\u7ae0\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%86mongodb3-2%e5%8d%87%e7%ba%a7%e5%88%b03-4%e7%9a%84%e5%b7%a5%e4%bd%9c\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%86mongodb3-2%e5%8d%87%e7%ba%a7%e5%88%b03-4%e7%9a%84%e5%b7%a5%e4%bd%9c\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%86mongodb3-2%e5%8d%87%e7%ba%a7%e5%88%b03-4%e7%9a%84%e5%b7%a5%e4%bd%9c\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5c06MongoDB3.2\u5347\u7ea7\u52303.4\u7684\u5de5\u4f5c\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/6530331a63adef3b3443a1fab53a0e6e\",\"name\":\"\u97f5, \u79d1\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/429ccb39b3fff5188bc17986222cfb0936cbadb8cc933cff04ab5ca01bd30a08?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/429ccb39b3fff5188bc17986222cfb0936cbadb8cc933cff04ab5ca01bd30a08?s=96&d=mm&r=g\",\"caption\":\"\u97f5, \u79d1\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunke\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%86mongodb3-2%e5%8d%87%e7%ba%a7%e5%88%b03-4%e7%9a%84%e5%b7%a5%e4%bd%9c\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u5c06MongoDB3.2\u5347\u7ea7\u52303.4\u7684\u5de5\u4f5c - Blog - Silicon Cloud","description":"\u5173\u4e8e\u5c06MongoDB3.2\u5347\u7ea7\u52303.4\u7684\u5de5\u4f5c\u7684\u6280\u672f\u6587\u7ae0","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:\/\/www.silicloud.com\/zh\/blog\/\u5c06mongodb3-2\u5347\u7ea7\u52303-4\u7684\u5de5\u4f5c\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5c06MongoDB3.2\u5347\u7ea7\u52303.4\u7684\u5de5\u4f5c","og_description":"\u5173\u4e8e\u5c06MongoDB3.2\u5347\u7ea7\u52303.4\u7684\u5de5\u4f5c\u7684\u6280\u672f\u6587\u7ae0","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u5c06mongodb3-2\u5347\u7ea7\u52303-4\u7684\u5de5\u4f5c\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-09-28T17:01:26+00:00","article_modified_time":"2025-08-12T09:21:00+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d05bb37434c4406bd9fb2\/2-0.png"}],"author":"\u97f5, \u79d1","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u97f5, \u79d1","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%86mongodb3-2%e5%8d%87%e7%ba%a7%e5%88%b03-4%e7%9a%84%e5%b7%a5%e4%bd%9c\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%86mongodb3-2%e5%8d%87%e7%ba%a7%e5%88%b03-4%e7%9a%84%e5%b7%a5%e4%bd%9c\/","name":"\u5c06MongoDB3.2\u5347\u7ea7\u52303.4\u7684\u5de5\u4f5c - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-09-28T17:01:26+00:00","dateModified":"2025-08-12T09:21:00+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/6530331a63adef3b3443a1fab53a0e6e"},"description":"\u5173\u4e8e\u5c06MongoDB3.2\u5347\u7ea7\u52303.4\u7684\u5de5\u4f5c\u7684\u6280\u672f\u6587\u7ae0","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%86mongodb3-2%e5%8d%87%e7%ba%a7%e5%88%b03-4%e7%9a%84%e5%b7%a5%e4%bd%9c\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%86mongodb3-2%e5%8d%87%e7%ba%a7%e5%88%b03-4%e7%9a%84%e5%b7%a5%e4%bd%9c\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%86mongodb3-2%e5%8d%87%e7%ba%a7%e5%88%b03-4%e7%9a%84%e5%b7%a5%e4%bd%9c\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u5c06MongoDB3.2\u5347\u7ea7\u52303.4\u7684\u5de5\u4f5c"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/6530331a63adef3b3443a1fab53a0e6e","name":"\u97f5, \u79d1","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/429ccb39b3fff5188bc17986222cfb0936cbadb8cc933cff04ab5ca01bd30a08?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/429ccb39b3fff5188bc17986222cfb0936cbadb8cc933cff04ab5ca01bd30a08?s=96&d=mm&r=g","caption":"\u97f5, \u79d1"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunke\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%86mongodb3-2%e5%8d%87%e7%ba%a7%e5%88%b03-4%e7%9a%84%e5%b7%a5%e4%bd%9c\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/30062","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=30062"}],"version-history":[{"count":3,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/30062\/revisions"}],"predecessor-version":[{"id":111662,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/30062\/revisions\/111662"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=30062"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=30062"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=30062"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}