Description
We use rocket.chat in docker. Our database has become very large. I have tried compacting collections, pruning messages, and then running a deleteMany on both the rocketchat__trash and rocketchat_integration_history collections. Somehow this has resulted in my databse becoming slightly larger when i run show dbs
in the mongo shell.
Server Setup Information
- Version of Rocket.Chat Server: 4.1.0
- Operating System: Ubuntu 20.04
- Deployment Method: docker
- Number of Running Instances: 1
- DB Replicaset Oplog: Unsure
- NodeJS Version: v12.22.1
- MongoDB Version: 5
- Proxy: nginx
- Firewalls involved: None
Any additional Information
Hi! Welcome to our forum!
What is the configured storage type for uploads (Admin > Uploads)? Maybe the upload files are the ones using the space.
Also, do you know about the retention policy configuration? You can automatically remove items older then X days configuring it (Admin > Retention Policy)
The storage type is GridFS. I think it is the uploads files, but i am confused because I pruned a bunch of the channels of any file attachments older than 6 months and then purged rocketchat__trash and there was no change. I did configure a retention policy this morning that I am hoping will at least help prevent the DB from becoming a lot bigger.
There is a community member that did a script to migrate uploads from gridfs to filesystem:
Maybe you can figure out if the files you deleted are still there or migrate and remove them from DB.