Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- htpasswd
- Apache
- 워드프레스 rss
- 워드프레스
- wordpress function
- Elasticsearch
- 프록시
- config
- Wordpress
- wordpress rss
- wordpress feed
- 워드프레스 피드
- memcached
- 아파치 프록시
- 크롤링
- 엘라스틱서치
- 인스타그램
- graph api
- Kibana
- memcache
- template
- 맵핑
- htaccess
- mapping
- 아파치
- 설정 파일
- elasticsrach template
Archives
- Today
- Total
EunsooD
mongodb DUMP / RESTORE 본문
반응형
몽고 DB를 백업하려고 한다. (동일하게 복제해서 한군데 더 만드려는 생각.)
처음엔 그냥 DB파일 복사해서 집어 넣었는데, 2.2버전에서 resync가 생각보다 쉽지 않았다.
마스터DB엔 내용이 잘 들어가졌는데, Slave로 sync가 안 됨.
그래서 다른 방법을 찾았다.
mongodbdump라는 명령어를 mongo에 접속하지 않고 쉘에서 주면 된다.
mongodump --host [hostname]:[portNumber] -u [userName] -p [pwd] --db [dbName]
각종 옵션은 http://docs.mongodb.org/v2.2/reference/mongodump/ 메뉴얼을 참고!
적용할 때도 비슷한 옵션에 명령어만 다르다.
mongorestore --host [hostname]:[portNumber] --db [dbName] --collection [coll name] /home/[dump 파일 위치]/
각종 옵션은 http://docs.mongodb.org/v2.2/reference/mongorestore/ 여기에서 확인!
반응형
Comments