Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

341
Visualizações
Create MongoDB database and set its path to a specific folder

I'm using ubuntu 16.04! Is it possible to change the data directory for a specific database in mongo? I'm trying to setup this recommendation engine and I was asked to create a new MongoDB database and set its path to folder.

over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

Pre-version 3.0.0, all the databases that one mongod hosts have to be in the same dbpath folder which can be set via command arguments using the --dbpath flag or the config file.

You could however run multiple mongods and host them individually? either on different ip/ports.

Version 3.0.0 you can use the --directoryperdb flag within the command arguments or config to set multiple directories per database (See https://docs.mongodb.com/manual/reference/program/mongod/#cmdoption--directoryperdb)

Uses a separate directory to store data for each database. The directories are under the --dbpath directory, and each subdirectory name corresponds to the database name.

over 4 years ago · Santiago Trujillo Relatório

0

When you start mongod.exe you can set the database path with the

mongod.exe --dbpath "path to your folder"

setting.

over 4 years ago · Santiago Trujillo Relatório

0

yes it's possible, run mongod process with --dbpath option

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda