Skip to main content

Required tools

Capsule uses mongodump (from MongoDB Database Tools) and mongosh to connect and restore.
Install MongoDB Database Tools directly from MongoDB’s package repo — not via apt (the apt package is outdated and may be missing mongodump):
# Import MongoDB public key
curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | \
  sudo gpg --dearmor -o /usr/share/keyrings/mongodb-server-7.0.gpg

# Add the repo (Ubuntu 22.04 example)
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] \
  https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | \
  sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list

sudo apt-get update
sudo apt-get install -y mongodb-database-tools mongosh
Do not use brew tap mongodb/brew on Linux — it installs macOS binaries that cannot run on Linux and will produce an exec format error.
Verify:
capsule doctor

Connection details

FieldExample
Hostlocalhost
Port27017
Database namemyapp
Usernamemyapp_user (leave blank if no auth)
Passwordyour password (leave blank if no auth)

Authentication

If your MongoDB instance uses authentication, provide the username and password. Capsule passes them to mongodump as --username and --password flags — they are not exposed in process listings.

Replica sets and Atlas

For a replica set, enter any member’s host in the Host field. Direct member connections (directConnection=true) are used so Capsule doesn’t attempt to discover the full replica set topology. For MongoDB Atlas, use the connection hostname from your Atlas dashboard (e.g., cluster0.abcde.mongodb.net).

Docker

If MongoDB runs in a container, enter the container name when adding the connection. Capsule will exec mongodump inside the container via docker exec.

Troubleshooting

mongodump: command not found The mongodb-database-tools package is separate from the MongoDB server. Install it explicitly and run capsule doctor to confirm. mongosh: command not found mongosh is a separate package from mongodb-database-tools. Install it alongside the tools (see installation steps above). Auth failed Ensure the user has the backup built-in role or equivalent read access on the target database.