Backup Process
Backup Process
- by Admin
- December 20, 2024
Prepare the AWS Environment
- Create an S3 Bucket:
- Log in to the AWS Console.
- Navigate to S3 > Create bucket and follow the wizard.
- Note the bucket name and region.
- Set Up Permissions:
- Assign permissions to the bucket using an AWS IAM Role or User.
- Attach a custom policy for necessary actions:
{ “Version”: “2012-10-17”, “Statement”: [ { “Effect”: “Allow”, “Action”: [ “s3:PutObject”, “s3:GetObject”, “s3:DeleteObject”, “s3:ListBucket” ], “Resource”: [ “arn:aws:s3:::your-bucket-name”, “arn:aws:s3:::your-bucket-name/*” ] } ] }
- Obtain AWS Credentials:
- If using an IAM User, generate the Access Key ID and Secret Access Key.
- Configure Ops Manager
- Access Ops Manager:
- Log in to your Ops Manager instance.
- Add the AWS S3 Blockstore:
- Navigate to Admin > Backup > Blockstore Settings.
- Click Add a Blockstore and select Amazon S3.
- Enter the following:
- S3 Bucket Name.
- Bucket Region.
- Path (if applicable).
- Access Key ID and Secret Access Key.
- Test the connection to ensure Ops Manager can access the bucket.
- Configure Backup Daemons:
- Verify that the Backup Daemons are running on their designated servers.
- Assign the S3 blockstore to these daemons.
- Set Snapshot Schedule:
- For each MongoDB deployment to be backed up:
- Enable Backup under Deployment > Backup.
- Configure the snapshot schedule.
- For each MongoDB deployment to be backed up:
- Verify Backups
- Monitor the Backup Jobs under Backup > Jobs in Ops Manager.
- Check the S3 bucket for uploaded snapshots.
Restore Process
- Identify the Snapshot
- In Ops Manager:
- Navigate to Backup > Snapshots.
- Locate the snapshot you want to restore.
- Note the Snapshot ID and details.
- Initiate the Restore
- Select Restore Option:
- Choose between:
- Point-in-time Restore: To restore to a specific timestamp.
- Snapshot Restore: To restore a specific snapshot.
- Choose between:
- Configure Restore Target:
- Select whether to restore to the original deployment or a new one.
- Provide the target cluster or host details.
- Start the Restore:
- Ops Manager will retrieve the snapshot from S3 and initiate the restoration.
- Verify the Restoration
- Monitor the Restore Jobs under Backup > Jobs in Ops Manager.
- Test the restored deployment to ensure data integrity and consistency.
Best Practices
- Encryption: Enable S3 bucket encryption (AWS KMS or S3-managed keys) to secure data.
- Versioning: Turn on bucket versioning for extra protection.
- Monitoring: Use AWS CloudWatch for bucket activity and Ops Manager logs for backup/restore status.
- Test Restores Regularly: Validate the process by performing periodic test restores to ensure readiness for disaster recovery.
These steps outline a robust process for backup and restore using MongoDB Ops Manager and AWS S3.
Recent Post
-
24 Dec 2024 AgencyWhat are the advantages of elasticsearch over mongodb database -
17 Dec 2024 AgencyHow to upgrade mysql from 5.7 to 8.0 -
17 Dec 2024 AgencyUnderstanding Ops Manager Backup Capabilities -
17 Dec 2024 AgencyBackup Process -
17 Dec 2024 AgencyWhy Do We Need Database Architecture Design And Monitoring Services?