1. Collection Export
mongoexport \
--host {ReplicaSet이름}/{호스트:포트,...} \
--readPreference primary \
--username {사용자계정} \
--password {비밀번호} \
--authenticationDatabase admin \
--db {DB이름} \
--collection {Collection이름} \
--out {출력파일}
2. Collection Import
mongoimport \
--host {ReplicaSet이름}/{호스트:포트,...} \
--writeConcern 1 \
--username {사용자계정} \
--password {비밀번호} \
--authenticationDatabase admin \
--db {DB이름} \
--collection {Collection이름} \
--drop \
--file {입력파일}
'MongoDB > MongoDB 관리' 카테고리의 다른 글
Mongo Shell 에서 서버 상태/정보 확인하기 (0) | 2016.11.25 |
---|---|
ReplicaSet 구성하기 (0) | 2016.10.14 |
MongoDB 에서 특정 DB 또는 Collection 백업/복원하기 (0) | 2016.09.07 |
Ops Manager 에서 하드웨어 모니터링 기능 활성화 하기 (0) | 2016.06.10 |
새로운 DB로 백업 DB를 복구하기 (0) | 2016.03.10 |