mongodb

Administer MongoDB NoSQL databases.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "mongodb" with this command: npx skills add bagelhole/devops-security-agent-skills/bagelhole-devops-security-agent-skills-mongodb

MongoDB

Administer MongoDB NoSQL databases.

Installation & Setup

Install

apt install mongodb-org

Start service

systemctl start mongod

Connect

mongosh

Create user

use admin db.createUser({ user: "admin", pwd: "secret", roles: ["root"] })

Basic Operations

// Create database and collection use mydb db.users.insertOne({ name: "John", email: "john@example.com" })

// Query db.users.find({ name: "John" }) db.users.find().sort({ name: 1 }).limit(10)

// Index db.users.createIndex({ email: 1 }, { unique: true })

Replica Set

// Initialize replica set rs.initiate({ _id: "myReplicaSet", members: [ { _id: 0, host: "mongo1:27017" }, { _id: 1, host: "mongo2:27017" }, { _id: 2, host: "mongo3:27017" } ] })

Backup

Backup

mongodump --out /backup/

Restore

mongorestore /backup/

Best Practices

  • Use replica sets in production

  • Implement proper indexing

  • Enable authentication

  • Regular backups with mongodump

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Security

sops-encryption

No summary provided by upstream source.

Repository SourceNeeds Review
Security

linux-administration

No summary provided by upstream source.

Repository SourceNeeds Review
Security

linux-hardening

No summary provided by upstream source.

Repository SourceNeeds Review