¿ÉÒÔʹÓÃMongodb×Ô´øµÄmongodumpºÍmongorestore¹¤¾ßÀ´ÊµÏÖÊý¾Ý¿âµÄ±¸·ÝºÍ»Ö¸´¡£ÆäÓ÷¨±È½Ï¼òµ¥£¬¿ÉÒÔʹÓÃÈçÏÂÃüÁîÀ´»ñÈ¡°ïÖúÐÅÏ¢£º
±¸·ÝʹÓÃÃüÁîmongodump£¬Èç¹ûÖ´ÐиÃÃüÁî²»´øÈκβÎÊý£¬»á°Ñ±¾»úÉÏÔËÐеÄÔÚĬÈ϶˿ڵÄmongodbÖеijýlocalÊý¾Ý¿âÍâµÄËùÓÐÊý¾Ý¿â±¸·ÝÏÂÀ´£¬´æ·ÅÔÚµ±Ç°Ö´ÐÐÃüÁîµÄĿ¼ÏµÄdump£¨Èç¹û²»´æÔÚ¸ÃĿ¼»á×Ô¶¯´´½¨£©Ä¿Â¼ÖУ¬²¢°´ÕÕÊý¾Ý¿âµÄÃû×Ö´æ·ÅÔÚ²»Í¬µÄ²»Í¬µÄĿ¼Ï£¬ÀýÈçÓиöÊý¾Ý¿âÃûΪtest£¬ÄÇôÆ䱸·ÝµÄÎļþ´æ·ÅµÄλÖÃΪ./dump/testĿ¼Ï¡£´ó²¿·ÖÇé¿öÏ£¬ÎÒÃÇ¿ÉÄܲ»»áÕâô¸É£¬ÄÇô¿ÉÒÔͨ¹ý-dÀ´Ö¸¶¨ÐèÒª±¸·ÝµÄÊý¾Ý£¬-oÀ´Ö¸¶¨±¸·Ý´æ·ÅµÄλÖã¬Í¬Ê±¿ÉÒÔʹÓÃ-hÀ´Ö¸¶¨ÐèÒª±¸·ÝµÄÖ÷»úµØÖ·¡£ÀýÈ磺
×¢Ò⣺±¸·Ý²»ÄÜÒ»´ÎÖ¸¶¨¶à¸öÊý¾Ý¿â£¬Ò²²»ÄÜÒ»´ÎÖ¸¶¨¶à¸öcollections£¬Ò²¾ÍÊÇ˵£¬ÒªÃ´Ò»´Î±¸·ÝÏÂÀ´ËùÓÐÊý¾Ý¿â£¬ÒªÃ´Ò»´ÎÖ»±¸·ÝÒ»¸öÖ¸¶¨µÄ¿â£¬Í¬Àí£¬ÔÚÖ¸¶¨ÁËÊý¾Ý¿âµÄÇé¿öÏ£¬ÒªÃ´È«²¿±¸·Ý¸Ã¿âϵÄËùÓÐcollections£¬ÒªÃ´Ö»±¸·ÝÖ¸¶¨µÄÒ»¸öcollections£¬ËùÒÔÒªÏëÖ»±¸·Ý¼¸¸öÖ¸¶¨µÄ¿â»òcollectionsʱ£¬¿ÉÒÔ¶à´ÎÖ´Ðб¸·ÝÃüÁÐÞ¸ÄÆäÊý¾Ý¿âÃû»òcollectionsÃû¼´¿É¡£ÁíÍâÈç¹ûÊý¾Ý¿âÐèÒªÈÏÖ¤£¬¿ÉÒÔʹÓÃ-uºÍ-pÀ´Ö¸¶¨Óû§ÃûºÍÃÜÂë¡£
ÉÏÊöÓÃmongodump±¸·ÝÏÂÀ´µÄÎļþ£¬¿ÉÒÔͨ¹ýmongorestoreÀ´½øÐлָ´¡£¿ÉÒÔmongodbʵÀýûÓÐÆô¶¯µÄÇé¿öÏÂÖ´Ðлָ´²Ù×÷£¬Õâ¸öʱºò±ØÐëʹÓÃdbpathÀ´Ö¸¶¨´æ·Å»Ö¸´Êý¾ÝµÄĿ¼£¬ÁíÍâ¿ÉÒÔʹÓÃdirectoryperdbÀ´Ö¸¶¨Êý¾Ý¿âµÄÊý¾ÝÎļþÊÇ·ñ°´Îļþ¼ÐÀ´Çø·Ö£»µ±È»ÔÚmongodbÒѾÆô¶¯Çé¿öÏ£¬Ò²ÊÇ¿ÉÒÔÖ´Ðлָ´²Ù×÷µÄ£¬Õâʱºòdbpath²ÎÊý²»ÊDZØÐëµÄ£¬Èç¹ûÖ¸¶¨dbpath£¬ÄÇôdbpath²»ÄÜÖ¸¶¨Îªµ±Ç°mongodbʵÀýÏàͬµÄdppath£¬·´Ö®mongorestore»á¸ù¾Ýµ±Ç°ÔËÐеÄʵÀý»ñÈ¡dbpath¡¢directoryperdbÐÅÏ¢,°Ñ±¸·ÝÊý¾Ý»Ö¸´µ±Ç°µÄmongodbµÄdbpathÖС£ÀýÈ磺
ÍƼöÐÅÏ¢
- linuxÃüÁîѧϰ±Ê¼Ç£¨11£©£ºnlÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨5£©£ºrmÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨4£©£ºmkdirÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨1£©£ºlsÃüÁî
- ½«CentosµÄyumÔ´¸ü»»Îª¹úÄڵİ¢ÀïÔÆÔ´
- ʹÓÃNginxÌí¼Óheader·ÀÖ¹ÍøÒ³±»frame
- linuxϼÓËÙscp´«Êä´óÎļþµÄËÙ¶È
- linuxϵͳÉ϶ÔnginxÈÕÖ¾·Ö¸î´¦Àí
- lnmp/nginxϵͳÕæÕýÓÐЧµÄͼƬ·ÀµÁÁ´ÍêÕûÉèÖÃÏê½â
- Í»ÆÆÊ®Íò²¢·¢µÄNginxµÄÅäÖü°ÓÅ»¯
ÈÈÃÅÐÅÏ¢
- nohup: redirecting stderr to stdou....
- ʹÓÃlog_formatΪNginx·þÎñÆ÷ÉèÖøüÏêϸµÄÈÕÖ¾¸ñʽ
- jquery easyUI--dataGrid-Json
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- ÀûÓÃKeepalived+mysql¹¹½¨¸ß¿ÉÓÃMySQLË«Ö÷×Ô¶....
- Nginx+keepalivedʵÏÖ¸ºÔؾùºâºÍË«»úÈȱ¸¸ß¿ÉÓÃ
- jqueryʵÏÖÒ³Ãæ¼ÓÔؽø¶ÈÌõ
- Rolling cURL: PHP²¢·¢×î¼Ñʵ¼ù
- codeigniter ·ÓÉÖÕ¼«ÓÅ»¯(url rewrite)
- linuxÏÂÉèÖÃsshÎÞÃÜÂëµÇ¼
×î½ü¸üÐÂ
- ²éÕÒ²¢É¾³ý.svnĿ¼Îļþ
- redis ÆßÖÖÊý¾ÝÀàÐ͵ÄʹÓó¡¾°
- linux ÏÂÎļþ¸´ÖƵ½windowsÏÂÂÒÂëµÄ½â¾ö°ì·¨
- nginx³öÏÖ502 upstream sent too big he....
- linuxÏÂsudoÅäÖÃÏê½â
- linuxÃüÁîѧϰ±Ê¼Ç£¨15£©£ºtailÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨14£©£ºheadÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨13£©£ºlessÃüÁî
- linuxÃüÁîѧϰ±Ê¼Ç£¨12£©£ºmoreÃüÁî
- ¼ÓÃÜËã·¨±È½Ï3DES AES RSA ECC MD5 SHA1µÈ
ÆÀÂÛ