Herramientas de usuario

Herramientas del sitio


db:mongodb

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anterior Revisión previa
Próxima revisión
Revisión previa
db:mongodb [2014/05/22 08:03]
alfred [Recover MongoDB after crash]
db:mongodb [2020/05/09 09:25] (actual)
Línea 9: Línea 9:
 $ sudo apt-get install mongodb-org $ sudo apt-get install mongodb-org
 </​code>​ </​code>​
 +
 +Si en /​etc/​apt/​sources.list.d aparece el fichero ''​mongod''​ sin extensión, entonces tendrás que renombrarlo a ''​mongod.list''​. \\ 
 +Probablemente tengas que lanzar ''​sudo apt-get install mongodb-server''​
 === Run Mongo === === Run Mongo ===
 <​code>​ <​code>​
 $ sudo start mongod $ sudo start mongod
 +</​code>​
 +... or...
 +<​code>​
 +$ sudo service mongod start
 </​code>​ </​code>​
 === Stop Mongo === === Stop Mongo ===
Línea 58: Línea 65:
 ===== Notes ===== ===== Notes =====
   * Logs are found in ''/​var/​log/​mongodb''​   * Logs are found in ''/​var/​log/​mongodb''​
 +  * ''​Robomongo''​ is a good ubuntu GUI client for MongoDB.
  
 ==== Recover MongoDB after crash ==== ==== Recover MongoDB after crash ====
-When the system crashes MongoDB remains locked. You chan do two things to unlock it:+When the system crashes MongoDB remains locked ​(error is shown in logs as //mongodb exception in initandlisten old lock file//). You chan do two things to unlock it:
   * If this is a development machine, you can remove the lock file manually. It's in ''/​var/​lib/​mongodb/​mongod.lock''​ or it could be named ''​mongo.lock''​.   * If this is a development machine, you can remove the lock file manually. It's in ''/​var/​lib/​mongodb/​mongod.lock''​ or it could be named ''​mongo.lock''​.
   * The safer route is to follow [[http://​docs.mongodb.org/​manual/​tutorial/​recover-data-following-unexpected-shutdown/​|MongoDB'​s Durability and Repair guide]]. In summary, for a machine with the above configuration,​ you should execute the following commands:   * The safer route is to follow [[http://​docs.mongodb.org/​manual/​tutorial/​recover-data-following-unexpected-shutdown/​|MongoDB'​s Durability and Repair guide]]. In summary, for a machine with the above configuration,​ you should execute the following commands:
db/mongodb.1400745804.txt.gz · Última modificación: 2020/05/09 09:24 (editor externo)