-
Notifications
You must be signed in to change notification settings - Fork 1
Prepare Rocket.Chat for a New Semester
This operation, should it fail, can delete all data for the previous semester. Hopefully people are using Rocket.Chat, and if they are they might have attachment to the messages they sent. They will be rightfully angry if you delete this without letting them know it will be gone.
Hopefully this will automatically happen at some point. But you probably want to do a manual backup right before you start deleting data. To do this:
docker exec --user root -ti mongo /bin/bash --login
mongodump --host localhost --db rocketchat
Go to Administration->Rooms and delete each room individually (don't do from database or you get weird phantom room errors)
mongo
use rocketchat
db.users.remove({roles: {$ne: "admin"}})
(Don't exit shell yet)
Use the house list spreadsheet to generate usernames and .csv files.
On your local machine:
- create a new folder for the root of the zip file to upload, e.g.
mkdir rc_import
cd rc_import
- create an empty folder inside the main folder for each channel to be created. The list of channels is in the google sheet under the rocketchat tab.
- save users.csv and channels.csv according to this format from the google sheet columns highlighted in yellow.
- zip them together with
zip your-folder-name *
- use the import csv tool in the rocketchat admin panel to import. Be sure to set import type to csv.
db.users.updateMany({active: false}, {$set: {active: true}})
- In Administration under Users, rename rocket.cat to clobot
- Log into Zapier and update any broken Zaps.
Help people install it, and push it at the first few councils and orientations.