The Great Open Source Debate with Elastic, Gluu and GitHub 🎤 Oct 26

How to delete all rocketchat_uploads so far

Description

I am looking for a way to delete all file uploads server wide as I was using the server storage option and now we’re moving to Webdav and I’d like to keep the server size as small as possible. I’ve seen in Mongodb that there are 3 collections that probably are the target ones: rocketchat_uploads, rocketchat_uploads.chunks and rocketchat_uploads.files.

I was wondering if there’s an option in Rocket Chat to delete all files from the app / CLI / etc or if not, whether dropping the 3 collections could lead to a problem.

Server Setup Information

  • Version of Rocket.Chat Server: 4.0.0
  • Operating System: Ubuntu 20.04
  • Deployment Method: snap
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
    actual oplog size
    ‘990 MB’

configured oplog size
‘990 MB’

log length start to end
‘8013119 secs (2225.87 hrs)’

oplog first event time
‘Mon Jul 05 2021 17:47:36 GMT+0200 (Central European Summer Time)’

oplog last event time
‘Wed Oct 06 2021 11:39:35 GMT+0200 (Central European Summer Time)’

now
‘Wed Oct 06 2021 11:39:41 GMT+0200 (Central European Summer Time)’

  • NodeJS Version: v12.18.4
  • MongoDB Version: 4.0.20 / mmapv1 (oplog Enabled)
  • Proxy: nginx
  • Firewalls involved: no

Any additional Information

Stop crashing in on other old threads please.

A proper search will have found you a number of links on migrating files eg

That has a link to a migrator script which can also remove files, plus there is another similar script somewhere in the main rocketchat git repo with a link here somewhere.

1 Like