Get the App
SLTechnology News&Howtos  ›  Database  › 

MongoDB operation

Shulou Source: shulou.com Published: 2022-06-01 08:16:24 10月03日 Update

# = 2. Mongo==

# backup database

Mongodump-h 127.0.0.1-d eb_mongo-o / root/xichang/eb_mongo.bak

# restore the database

Mongorestore-d eb_mongo eb_mongo.bak/*-- drop

# install mongo

1. Add yum installation source for mongo

Vi / etc/yum.repos.d/mongo.repo # add yum installation source mongo.repo

[10gen]

Name=10gen Repository

Baseurl= http://downloads-distro.mongodb.org/repo/redhat/os/x86_64

Gpgcheck=0

# [mongodb-org-3.0]

# name=MongoDB Repository

# baseurl= http://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.0/x86_64/

# gpgcheck=0

# enabled=0

Yum install mongo-10gen mongo-10gen-server # mongo-10gen is a client tool

Service mongod start

Chkconfig mongod on

Tags: Data databases backups customers clients tools Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Shulou Information Huawei Apple Microsoft