Changes

From SME Server
Jump to navigationJump to search
332 bytes added ,  15:51, 5 March 2017
Line 240: Line 240:     
==Mongo DB examples==
 
==Mongo DB examples==
 +
 +
===Usage===
    
Example using mongo itself:
 
Example using mongo itself:
Line 256: Line 258:  
  db.rocketchat_settings.update({"_id" : "From_Email"}, {$set: {"value":"admin@yourdomain.com"}})
 
  db.rocketchat_settings.update({"_id" : "From_Email"}, {$set: {"value":"admin@yourdomain.com"}})
 
  db.rocketchat_settings.update({"_id" : "SMTP_Host"}, {$set: {"value":"mail.yourdomain.com"}})
 
  db.rocketchat_settings.update({"_id" : "SMTP_Host"}, {$set: {"value":"mail.yourdomain.com"}})
 +
 +
===Database Backup===
 +
 +
You can dump the tables to a directory of your choice:
 +
 +
mongodump --dumpDbUsersAndRoles -d rocketchat -o /root/rocketchatmongo
 +
 +
===Database Restore===
 +
 +
You can restore you database as follows:
 +
 +
mongorestore --restoreDbUsersAndRoles -d rocketchat -dir  /root/rocketchatmongo/rocketchat --quiet
    
==Node usage==
 
==Node usage==

Navigation menu