Blog Content

  • [Python] MongoDB 컬렉션 사이즈 확인

    Category SOURCE on 2017. 2. 9. 14:41

    소스 저장후 python test.py 실행하면 admin, local, config 를 제외한 모든 데이터베이스에 대한 컬력션 용량 정보가 출력 됩니다. #!/usr/bin/python #!-*- coding: utf-8 -*- import time import pymongo from pymongo import MongoClient USER='아이디' PASS='패스워드' client = MongoClient("mongodb://192.168.0.1",30011) db = client['admin'] db.authenticate(USER,PASS, mechanism='SCRAM-SHA-1') lotime = time.strftime('%Y/%m/%d %H:%M:%S',time.localtime(time..

    Read more
  • [MongoDB] copyDatabase

    Category NOSQL on 2017. 2. 9. 14:34

    https://docs.mongodb.com/manual/reference/method/db.copyDatabase/ 속도는 dump 와 비슷하다. 제약사항은 Slave 에는 카피할 수 없다. file=`/bin/date '+%Y%m%d'` file='fffff' createUser="use game_${file};db.createUser({user:\"아이디\",pwd:\"패스워드",roles: [{role:\"readAnyDatabase\",db:\"${file}\"}]})" copyCommand="db.copyDatabase("game","game_${file}","192.168.0.1:31001","아이디","패스워드","SCRAM-SHA-1")" copyDatabase 명령어는 복사해오려는 서버..

    Read more
  • [MongoDB] 3.4.2 버전 릴리즈 정보

    Category NOSQL on 2017. 2. 9. 14:28

    MongoDB 3.4.2 버전이 2017/2/1 릴리즈 되었습니다. 3.2.9 이후 현재 버전까지 WT의 성능관련 큰 버그는 없는 것으로 보입니다. 릴리스 내용 : https://docs.mongodb.com/manual/release-notes/3.4/?_ga=1.90247453.669056741.1420680288 WiredTiger full DB scan할 때 비효율적인 I/O 현상이 발생하는 문제가 발생했는데.. 해당 문제가 개선 되었네요 SERVER-27125: Arbiters in pv1 should vote no in elections if they can see a healthy primary of equal or greater priority to the candidate. SERVER..

    Read more