MongoDB Atlas: Connect Restore Projects
Who can use this feature
Anyone with these permissions: Manage restore connections (Cloud workloads, SaaS applications)
Connecting a restore project lets Eon restore into your Atlas clusters, and you can keep that restore traffic off the public internet. This article explains how to connect a MongoDB Atlas restore project to Eon, and how to keep restore traffic on the AWS private network with a private endpoint or an existing VPC peering. You choose a private endpoint or a VPC peering. If you set up both, Eon uses the private endpoint first. A MongoDB Atlas restore project links a specific MongoDB Atlas project to an existing AWS restore account.
Eon uses the AWS restore account to:
-
Store Atlas project API keys in Secrets Manager when you connect.
-
Provision the temporary restore server, which operates as a command node to read backup data from the vault and load it into MongoDB.
-
Provide the restore node IAM role that you register in MongoDB Atlas as the restore database user.
In the MongoDB Atlas project, you deploy Eon’s access (API key, database user, and IP access list). During restore, Eon creates a new cluster or reuses an existing one with the name you specify.
Connect a restore project
You’ll start this procedure on the MongoDB Atlas restore projects restore accounts page by clicking Connect Restore Account and selecting MongoDB Atlas.
Before you start
Before you connect your restore project, make sure:
-
You have an AWS restore account connected to Eon and in the Connected state, with restore permissions version 1.10.4 or later. The AWS account is required because MongoDB Atlas is a managed service and needs an AWS control plane for restore operations. See AWS: Connect Restore Accounts for instructions.
-
You have access to the MongoDB Atlas project with permissions to create database users and API keys.
-
You understand the permissions Eon needs to restore your data. See MongoDB Atlas: Permissions Deployment Files for details.
Select AWS restore account
Choose the AWS restore account to serve as the control plane for MongoDB Atlas restore operations.
The selected account must be in the Connected state and have restore permissions version 1.10.4 or later. Only eligible accounts are shown in the list.
Provide Project ID and choose deployment method
-
In the Project ID field, paste your MongoDB Atlas Project ID.
-
Choose whether you want to deploy with Terraform or Bash:
-
Terraform: Use the provided Terraform module to install the required configurations.
-
Bash: Run the provided bash script to install the required configurations.
-
The wizard displays the command or module invocation you’ll need.
Deploy permissions
Bash
Terraform
-
Copy the provided command and run it in a terminal. The command downloads and runs a script that creates the necessary database users and API keys. You can review the script before running it.
-
The script uses MongoDB Atlas OAuth device authorization for authentication. Follow the prompts to authenticate.
-
After the script completes, it displays the Eon public key and Eon private key. Copy these values.
Enter Eon keys
Return to the Eon console and paste the Eon public key and Eon private key from the setup output, and then click Connect.
Eon checks that the necessary configurations are in place in the MongoDB Atlas project and, if successful, adds the restore project to the MongoDB Atlas projects list.
Eon now has the access it needs in the MongoDB Atlas project, and you can restore a cluster or selected databases to clusters in the project.
To keep traffic between Eon and this project on the AWS private network, configure a private endpoint or use an existing VPC peering.
Configure a private endpoint
You can configure an AWS private endpoint so traffic between Eon and this Atlas project stays on the AWS private network. For a restore project, the AWS VPC interface endpoint resides in your own AWS restore account (the account where Eon’s temporary restore server runs). You create the VPC endpoint yourself and then provide its ID to Eon. For background, see MongoDB Atlas: About Private Endpoints.
Before you start, make sure:
-
Your Atlas cluster is a dedicated cluster (M10 or higher). Private endpoints aren’t available on Free or Flex clusters.
-
You have Project Owner or Organization Owner access in the MongoDB Atlas project.
-
Your cluster is in an AWS region where you plan to configure the private endpoint. Private endpoints are region-specific.
Create the endpoint service in MongoDB Atlas
-
In the MongoDB Atlas console, go to the Database & Network Access page, then click Private Endpoint in the sidebar.
-
Select the Dedicated Cluster tab and click Create Endpoint Service.
-
Choose AWS as the cloud provider, select the Atlas Region that matches your cluster, and click Create Endpoint Service.
-
Copy the Service Name displayed for the endpoint service. You’ll use it in the next step.
Create the VPC endpoint in your AWS restore account
In your AWS restore account, create an interface VPC endpoint that targets the Atlas endpoint service name you copied.
When the endpoint is created, copy its VPC Endpoint ID (begins with vpce-).
Register the endpoint with Eon and Atlas
-
In the Eon console, navigate to the restore project and open the private endpoint configuration. Enter the VPC Endpoint ID you copied from AWS.
-
In the MongoDB Atlas console, return to the Database & Network Access page, open your endpoint service, click Add Endpoint, and select Connect Existing Endpoint.
-
Enter the VPC Endpoint ID, click Submit Endpoint, and wait for Atlas to show Available.
-
In Eon, verify the connection.
Once verification succeeds and the private endpoint is Available, restore traffic to clusters in that endpoint’s region flows over AWS PrivateLink on the private network.
Use VPC peering
If your MongoDB Atlas restore project is already peered with the VPC of your AWS restore account, Eon’s temporary restore server reaches the restored cluster over that peering. This keeps restore traffic off the public internet without a private endpoint.
Eon needs no setup in the Eon console for this. You create the peering in MongoDB Atlas and AWS, as described in the Atlas network peering documentation and the Amazon VPC peering documentation. Peering applies to clusters hosted entirely on AWS, because restores run through an AWS restore account.
Eon connects to a cluster through a private endpoint, a VPC peering, or the cluster’s public hostnames. For how Eon chooses between them, see Restore projects.
Before you start, make sure:
-
Your Atlas cluster is a dedicated cluster hosted entirely on AWS (M10 or higher).
-
A peering exists between the Atlas restore project and the VPC the restore server runs in. To set which VPC the restore server uses, see AWS: Customize Restore Server Configuration.
-
For a multi-region cluster, a peering connects the restore server’s VPC to the Atlas network container of every region where the cluster has nodes. If any region isn’t peered, Eon connects over public hostnames.
Confirm the VPC the restore server runs in
Go to AWS restore accounts, expand the AWS restore account, and find Account configuration → Restore server connectivity.
The restore server runs in the VPC you customized there for the region of the restore. We recommend customizing one VPC per region. If the account has no customized VPC for the region, the restore server runs in the restore account’s default VPC in that region.
Note the VPC ID.
Confirm the peering is Available and targets that VPC
In MongoDB Atlas, check that the project’s VPC peering shows Available and that it targets the VPC from the previous step.
For a multi-region cluster, check that each region where the cluster has nodes has one.
Note the CIDR block of each network container.
Check the route to the Atlas CIDR
In AWS, open the route table of every subnet the restore server can use: the subnets you customized, or the subnets of that VPC in the region of the restore. Check that each route table has a route to the CIDR block of each peered Atlas network container through the peering connection.
Eon picks the peering for the next restore to that cluster when the Atlas-side conditions hold: the peering is Available, it targets the VPC the restore server runs in, it covers every region of a multi-region cluster, and the cluster has a peering connection string. For the restore server to reach the cluster over the peering, it also needs the route in step 3 and open outbound port 27017 in step 4. The Eon console doesn’t show which path a restore used.
Eon connects over the cluster’s public hostnames when an Atlas-side condition isn’t met, for example when:
-
The peering isn’t Available.
-
The peering targets a different VPC than the one the restore server runs in.
-
The peering doesn’t cover every region of a multi-region cluster.
-
The cluster has no peering connection string yet, because Atlas publishes one only once a peering exists.