Skip to Content
몽고DB 완벽 가이드(3판): 실전 예제로 배우는 NoSQL 데이터베이스 기초부터 활용까지
book

몽고DB 완벽 가이드(3판): 실전 예제로 배우는 NoSQL 데이터베이스 기초부터 활용까지

by 김인범, 크리스티나 초도로우, 섀넌 브래드쇼, 오언 브라질
March 2021
Beginner to intermediate
600 pages
12h 19m
Korean
Hanbit Media, Inc.
Content preview from 몽고DB 완벽 가이드(3판): 실전 예제로 배우는 NoSQL 데이터베이스 기초부터 활용까지
553
23
백업
데이터 파일이 변경되지 않게 해야 한다.
fsyncLock
명령으로 해결한다.
> db.fsyncLock()
명령은 추가적인 쓰기를 방지하도록 데이터베이스를 잠근다. 또한 모든 더티 데이터
dirty
data
디스크로 플러시 (
fsync
)함으로써 데이터 디렉터리 내 파일이 최신의 일관성 있는 정보를 가
지며 변경되지 않도록 보장한다.
명령이 실행되고 나면
mongod
는 들어오는 쓰기 작업을 모두 큐에 넣는다.
mongod
는 락이 해제
될 때까지 쓰기를 처리하지 않는다. 이 명령은 (
db
가 연결된 데이터베이스뿐 아니라) 모든 데
이터베이스에 쓰기를 멈춤을 알아두자.
fsynclock
명령이 반환되면 데이터 디렉터리 내 모든 파일을 백업 위치로 복사하자. 리눅스에
서 다음과 같은 명령으로 수행한다.
$ cp -R /data/db/* /mnt/external-drive/backup
데이터 디렉터리에 있는 모든 파일과 폴더를 백업 위치로 확실하게 복사했는지 확인하자. 파일
이나 디렉터리가 누락되면 백업이 사용할 수 없게 되거나 손상될 수 있다.
데이터 복제가 끝나면 다시 쓰기를 받아들이도록 데이터베이스 락을 해제한다.
> db.fsyncUnlock()
데이터베이스는 다시 정상적으로 쓰기 작업을 처리한다.
인증과
fsyncLock
에 몇몇 락 문제가 있음을
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

풀스택 서버리스: 리액트, AWS, 그래프QL을 이용한 최신 애플리케이션 개발

풀스택 서버리스: 리액트, AWS, 그래프QL을 이용한 최신 애플리케이션 개발

김범준, 네이더 다빗

Publisher Resources

ISBN: 9791162244067