8

I have a mongodb server (A) and a http server (B). I would like to run mongodump and mongorestore commands on http server (B) to backup data on server B. But these tools comes with mongodb installation and i don't want to install mongodb to my http server.

How can i achieve this?

edigu
  • 271
  • 1
  • 3
  • 11
  • 1
    You mean you don't want to download the binaries? There's no need to "install" mongodb as a package of your distro – user Jan 19 '12 at 15:33
  • What distribution are you using? – rvs Jan 21 '12 at 09:07
  • ubuntu-debian installed via: http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages – edigu Jan 22 '12 at 12:19
  • 1
    apt-get install mongodb-clients (or sudo apt-get install mongodb-clients) worked for me on Ubuntu 14.04 when needing just the client and not the 'weight' of the full install. I know we're not talking about much of a footprint but I tend to subscribe to the 'only what you need' model of server admin. – J Lawson Dec 29 '14 at 18:12

4 Answers4

8

I know this is quite an old question, but googling took me there. On ubuntu 14.04 I have a following line in /etc/sources.list.d/mongo.list to have the 3.2 version there:

deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse

The source contains few packages. According to the MongoDB Manual it's like this:

  • mongodb-org - A metapackage that will automatically install the four component packages listed below.
  • mongodb-org-server - Contains the mongod daemon and associated configuration and init scripts.
  • mongodb-org-mongos - Contains the mongos daemon.
  • mongodb-org-shell - Contains the mongo shell.
  • mongodb-org-tools - Contains the following MongoDB tools: mongoimport bsondump, mongodump, mongoexport, mongofiles, mongooplog, mongoperf, mongorestore, mongostat, and mongotop.

So in your case the mongodb-org-tools should be enough.

Ikar Pohorský
  • 305
  • 3
  • 5
6

Usually Linux distributions create several packages from a single software, like server, clients, dev and doc.

For example, on Debian, you can install the mongodb-clients package that contains mongodump and mongorestore and does not install the mongodb server.

user842313
  • 831
  • 4
  • 5
5

10gen doesn't provide seperate packages such as server - clients - dev & doc for mongodb (at least I couldn't found for Ubuntu 10.04). So I just copied /usr/bin/mongodump and /usr/bin/mongorestore binaries to my HTTP server manually (machines were same architecture) Now i'm running these commands on my server which doesn't have any mongodb installation without problems.

edigu
  • 271
  • 1
  • 3
  • 11
4

For those installing on Amazon Ubuntu on EC2 using the 10gen yum repository for MongoDB, I had to sudo yum install mongo-10gen.x86_64 to get mongo, mongodump, mongorestore and mongos.

Don't forget you can always sudo yum search mongo...