Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Cleaning an Home Server #3167

Closed
ArchangeGabriel opened this issue May 1, 2018 · 9 comments
Closed

Cleaning an Home Server #3167

ArchangeGabriel opened this issue May 1, 2018 · 9 comments

Comments

@ArchangeGabriel
Copy link
Contributor

Sorry if I missed information somewhere, but I cannot find how to “clean” an home server.

Basically, I would want to remove:
– communities with no-one inside (basically were created as tests);
– local rooms or copy of federated rooms for which no local user are inside anymore.

Currently I think there is a growing number of “dead rooms” (and associated content) on my HS, and I’d like to get ride of them.

Thanks for your help!

@krombel
Copy link
Contributor

krombel commented May 2, 2018

@ArchangeGabriel: I do not know any official announced way to do your tasks.
As a (temporary?) solution you might want to use synapse_janitor. It at least does the second task.
I do not know any way to cleanup empty communities.

@ArchangeGabriel
Copy link
Contributor Author

This assumes synapse use PostgreSQL, which is not the case for me (synapse stores it DB under /var/lib/synapse/homeserver.db and I have no postgresql installed).

@ArchangeGabriel
Copy link
Contributor Author

OTOH I should maybe port my existing DB (which is thus sqlite3) to PostgreSQL anyway, after what I should be able to clean it.

@neilisfragile
Copy link
Contributor

Definitely recommend postgres for anything other than very low usage - if you are at the point where you care about clean up, then postgres sounds like a good choice.

@ArchangeGabriel
Copy link
Contributor Author

OK, will do. I’ve also discovered https://github.com/matrix-org/synapse/blob/master/scripts-dev/nuke-room-from-db.sh, but I suppose synapse_janitor is already doing the same thing automatically for all relevant rooms?

Also, are empty communities and “dead” media files (in the sense of not being used by any existing rooms any more) cared of by this?

@neilisfragile
Copy link
Contributor

neilisfragile commented May 9, 2018

A very quick look at Janitor suggests that it has the same/similar delete logic as the nuke-room-from-db

As of right now neither nuke-room or janitor support purging empty communities I'm afraid.

@neilisfragile
Copy link
Contributor

#3187 is a relevant issue to track the gap

@ArchangeGabriel
Copy link
Contributor Author

Hum not really, it’s about deleting rooms from communities, not empty communities.

@neilisfragile
Copy link
Contributor

Oh fair point, have created #3206

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants