Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I already have a mongo running on my computer. I would like to move this to a docker container.
Now, I understand that a container should be immutable,and I agree.
In this case, how should I actually use my local data or import it to the mongo container?
You don't have to import it, you can mount your host mongodb "data" directory to your container's /data directory where your mongodb is running within. Then your mongodb running inside a container will share the same data as you are currently using with your mongo running on your host.
This link will help: https://docs.docker.com/engine/userguide/containers/dockervolumes/
If you run mongo in a container and don't mount the data volumes out of the container then when that container stops running the data is gone with it.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 15 hours ago.
Improve this question
how to connect Node.js with MongoDB using a .env file. the mongodb connection is running on a local server. i run npm start in my terminal and the server not found logic of the app.js file is executed instead
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
Task:
To install MongoDB after downloading
To Note:
I can't install it from terminal for some reasons. And I am using Ubuntu 14.04
I just don't know what to do after downloading. Coz there are no executable files or something.
This is preety good article for installation of mongodb step by step.
How-to-install-mongodb-on-ubuntu
Click here for mongoDB tutorials
To start your mongodb server : mongod
You may find error that database directory is not created. For that,
Create your database directory(default path) : mkdir -p /data/db and then restart your server again.If you did not find any error then skip this part.You can also change your database directory path. Here is command for that mongod --dbpath /your/path
Open new terminal and execute : mongo
If you have any query feel free to comment.Good luck.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I have an Amazon EC2 instance running postgres. I would like to connect another EBS volume to this that is used ONLY for postgres data. I can add the volume, but how do configure postgres so it uses the mounted ebs drive for it's data storage?
Create a file system on the EBS and then mount it. See
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html
Set ownership of your filesystem to postgres.
Use the initdb command to initialize your new space.
Tell postgres to use your new file system, by using the -D option to
the postgres binary, setting the PGDATA environment variable, or by
setting the value of data_directory in postgresql.conf
You would edit the postgres pgdata and point it to the directory mapped to your EBS volume, as described in the thread here -
http://www.linuxquestions.org/questions/linux-server-73/change-postgresql-data-directory-649911/
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
When I connect to default localhost 5432, I get a blank "Guru hint - Server not listening message"
Normally, it should show some messages but I get a blank one!
Can somebody please tell me what's going on?
P/s: I'm new in using pgAdmin III and have absolute zero knowledge about connections. ><"
on what server do you have postgresql server running? make sure your postgresql server starts. on windows check postgre service, on linux do ps -ef | grep postgresql or /sbin/service postgresql status.
If the server already started, check your DB connection set up in PGAdmin.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I've just purchased a new computer (mac OSX) and I want to continue developing using the same database I had on the old computer. I don't want it remotely done cause I dont want to keep the other computer on. I just want to copy the db and put it on this computer for development. I have a USB stick I can use but I'm not sure how to proceed. brew, rails, ruby, rvm, pg are all installed and configured.
pg_dumpall ?
To dump all databases:
$ pg_dumpall > db.out
To reload this database use, for example:
$ psql -f db.out postgres
I had to do it with -o option for the oids