How to Quickly Restore MongoDB Data for an Impaired Volume?

0

I have 3 EC2 instances mongo01, mongo02 and mongo03 running MongoDB 4.2.4 with replication. After yesterday's AWS data center power outage, mongo02 cannot start due to an impaired volume with the MongoDB data.

I am wondering if the following steps can let me bring mongo02 back online quickly:

  1. create a snapshot of /data in mongo01
  2. create a new volume 100Gb with the snapshot in (1)
  3. attach the volume in (2) to mongo02, set device name /dev/sdf
  4. start mong02
  5. fix /etc/fstab (ie change UUID)
  6. mount /data
질문됨 2년 전403회 조회
1개 답변
0

The mentioned steps should work for getting 'mongo02' back up. In case you need a walkthrough with an AWS Technical Support Engineer, feel free to open up a case with AWS Premium Support and choose method as either Chat/Call. You can also link this re:Post question for their reference in your case notes.

Going forward, I suggest looking into Amazon Data Lifecycle Manager. You can use Amazon Data Lifecycle Manager to automate the creation, retention, and deletion of EBS snapshots and EBS-backed AMIs. Please find more information here:

The following procedure shows you how to use Amazon Data Lifecycle Manager to automate Amazon EBS snapshot lifecycles:

For context, if we had a known working snapshot for EBS volume associated with 'mongo02', we could have just created a volume from snapshot and replaced it. We would not have needed to edit /etc/fstab or any other configurations. Since this thread is about quick recovery and having the lowest Recovery Point Objective and Recovery Time Objective, I would suggest looking into automating snapshot lifecycles.

AWS
지원 엔지니어
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠