the bin directory was not found on the server. How to use the command mongodump-h for database backup. Thank you
the bin directory was not found on the server. How to use the command mongodump-h for database backup. Thank you
if your mongo installation adds the bin directory to the environment variable, you can use whereis mongodump
to find out where the command is.
if you have not added the environment variable, you can use the ps-ef | grep mongo
command to see how your mongo is started.
if your mongo is started by hand-typing command, then the above command can show your startup command. You will also find the bin directory of mongo.
if your mongo is started in ways such as systemd, you may need to further check the startup script of mongo, such as vim / etc/init.d/mongo
, to find its bin directory.
if the above command has only one output, that is, only ps-ef | grep mongo
, your mongo is not started at all. You don't have to bother figuring out how to back up data with the mongodump command.
important question: the mongodump command only needs to know the port number and authorization information, and you can also connect to url, using mongo. Why do you have to find its bin directory? Look at the screenshot above. You already have the root account of the system. Don't you know the mongo port number and account password?
Previous: Advantages and disadvantages of loading html templates in this way
Next: After the ant-design-pro project npm run build, the browser opens and reports an error.
ip and port are OK on the server! bind_ip 0.0.0.0 ip ask the boss to have a look. No, no, no. It s okay to pay for an answer! ...
linux system starts after installing MongoDB: . bin mongod: error while loading shared libraries: libssl.so.10: cannot open shared object file: No such file or directory ...