DOMDOM
0posts
today
total
personal posts · since 2021

Fragments
of a day.

A small notebook for slow moments slipping by.

2023 IT Creator
2024 Food Creator
2025 News Creator
2026 News Creator

Latest Posts최근 글

tistory view

Back to Home

[mongoDB] 데이터베이스 서버 내에서 특정 컬렉션 데이터를 json으로 다운로드 받기

728x90
반응형

 

mongoDB를 사용하고있는 데이터베이스 서버에서 특정 컬렉션 데이터를 json으로 받을 수 있는 명령어는 아래와 같다

 

1
mongoexport --authenticationDatabase admin -<user> -<password> --db <database> --collection <collectionName> --out JSON파일명.json
cs

mongoexport --authenticationDatabase admin -u <user> -p <password> --db <database> --collection <collectionName> --out JSON파일명.json

 

<user>, <password>에 데이터베이스에 로그인할 username, password를 입력, 

<database>와 <collectionName>에 json파일로 추출할 데이터베이스명과 컬렉션명을 입력하면 된다.

 

728x90
반응형

Comments