Skip to main content

MongoDB Backup

Compatibility

MongoDB Compatibility

VersionSupport
MongoDB 5
MongoDB 6
MongoDB 7
MongoDB 8

Supports all editions of MongoDB, including managed services like MongoDB Atlas, as long as you have access to the database server.

Supported Backup Types

Backup TypeSupport
Full (Archive)

All MongoDB versions support full backups only supporting the mongodump utility. Data is exported in the archive format.

I. Adding a Server

The first and foremost step involves adding a server. In the platform selection, select MongoDB.

II. Setting up the Agent

The second step is to set up the agent on your server. Follow the linux agent installation guide to set up the agent on your Linux server.

note

Kindly make sure that the agent is running with sufficient privileges to access the MongoDB server.

III. Setting up the connection

After the agent is installed and running, you need to set up the connection to your MongoDB instance. PettiCloud requires you to specify the following details:

  • Host: The hostname or IP address of your MongoDB server.
  • Port: The port number on which your MongoDB server is running (default is 27017).
  • User: The username to connect to the MongoDB server.
  • Password: The password for the specified user.
  • Use SRV Protocol: If your MongoDB instance uses the SRV protocol, you can enable this option to use it. For most local installations, this can be set to false. For managed services like MongoDB Atlas, you can set it to true. If you're not sure, kindly refer to your MongoDB service provider's documentation.
  • Authentication Source: The database to authenticate against (default is admin).

Now click on authenticate to verify the connection. If the connection is successful, you will be navigated to the Create Backup Job page where you can create your first backup job.

IV. Creating a Backup Job

Once the connection is set up, you can create a backup job. The backup job allows you to specify the type of backup you want to perform, the frequency of the backup, and other options. You can choose to perform a full backup of your MongoDB database, which will create an archive of the entire database. You can start the backup job after specifying the required jobs.

V. Viewing Snapshots

Once the backup job is created and executed, you can view the snapshots of your MongoDB database. The snapshots will be listed in the dashboard, and you can download them as needed. The snapshots will include the size, type, and status of the backup.

With this, your MongoDB backup is set up and running. You can now manage your backups from the PettiCloud dashboard.

Known Limitations

Snapshot sizes greater than 1,048,576,000,000 bytes (~ 976 GiB) are not supported.