Changes
From SME Server
Jump to navigation
Jump to search
← Older edit
Newer edit →
MongoDB
(view source)
Revision as of 16:37, 1 November 2021
656 bytes added
,
16:37, 1 November 2021
no edit summary
Line 144:
Line 144:
replication:
replication:
replSetName: rs0
replSetName: rs0
+
+
+
Once started you need to initialises the replicaset:
+
+
mongo --eval "printjson(rs.initiate())"
+
+
===Dump and restore===
+
+
Samples - YMMV.
+
+
Quick little script to dump the Rocket.Chat collection:
+
+
#!bin/bash
+
echo "Dump with Users/Roles"
+
mongodump --dumpDbUsersAndRoles -d rocketchat -o /root/backup/rocketchatmongo
+
echo "dump all"
+
mongodump -d rocketchat -o /root/backup/rocketchatmongo-all
+
+
+
And to restore:
+
+
mongorestore /root/backup/rocketchatmongo-all
+
+
Do not restore between versions.
+
+
If you export from a version eg 4.0 then restore to that version. Do not try and restore 4.0 to 4.2 or higher.
+
+
Then change your repo, and then upgrade mongo.
+
===Vaporise or reinitialise the database===
===Vaporise or reinitialise the database===
ReetP
Bureaucrats
,
Administrators (Semantic MediaWiki)
,
Curators (Semantic MediaWiki)
,
Administrators
891
edits
Navigation menu
Page actions
Page
Discussion
View source
History
Page actions
Page
Discussion
More
Tools
In other languages
Personal tools
English
Log in
Koozali SME Server
Main Page
Welcome
Releases
Testimonials
Documentation
SME Server FAQ
Volunteering
Commercial Support
Recent activities
Dashboard
Recent wiki changes
Recent bug changes
Unread Forum posts
Koozali resources
Contribs
How-To's
Forums
Bugzilla
Mailing Lists
Translations
Download
Koozali SME Server wiki
Wiki statistics
Wiki categories
Wiki Help
Koozali Wiki Help
Tools
Special pages
Printable version
Search