How to solve the problem of installing mongodb on ubuntu?


(ariel) #1

I want to backup my alerts settings, so i command “mongodump -h dbhost -d dbname -o dbdirectory”, but I have some trouble

this my Error message

and i command" sudo apt-get install mongodb-clients "
this my Error message



and i command" sudo apt-get update "
this my Error message


Looking forward for your reply.
Thank you


(Jochen) #2

Make sure that the name resolution on that machine is working, /etc/resolv.conf, resolvconf, etc.


(ariel) #3

Thank you @jochen , I successfully downloaded mongodb tools
Now have to backup , But how do I solve this problem?

Looking forward for your reply.
Thank you


(Jochen) #4

Make sure that the system user you’re running the command with has permission to write into the directory you’ve given to mongodump.

Check the output of the following command:

# namei -l /etc/graylog/backup/

(ariel) #5

Hi @jochen:

Thank you, I check the command

Is this has permission ?

Looking forward for your reply.
Thank you


(Jochen) #6

As you can see from the output, only the user “root” is allowed to write into the directory /etc/graylog/backup/.

For an introduction to Linux file system permissions, please refer to


(ariel) #7

hi @jochen
Thank you for your answer
and I want to ask What command can make me get permission?
Let (mongodump -h 127.0.0.1 -d graylog -o /etc/graylog/backup) can run?

Looking forward for your reply.
Thank you


(Jochen) #8

Either use a different directory, run the command as “root”, or change the permissions of /etc/graylog/backup/ with chown or chgrp.


(ariel) #9

hi @jochen

Thank you very much !!! I succeed to make it run


How do I import backups to graylog
(system) #10

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.