diff --git a/Synapse-database-maintenance-tools.md b/Synapse-database-maintenance-tools.md index f30230b..35eda44 100644 --- a/Synapse-database-maintenance-tools.md +++ b/Synapse-database-maintenance-tools.md @@ -3,6 +3,12 @@ List of useful tools and scripts for maintenance Synapse database: ## [Purge Remote Media API](https://github.com/matrix-org/synapse/blob/master/docs/admin_api/purge_remote_media.rst) The purge remote media API allows server admins to purge old cached remote media. +#### Purge local media +There is no purge API for local media because you may be the only one with a copy. If you are sure you want to delete local media you could use something like the following to delete media that hasn't been accessed in a while. + +`find /path/to/synapse/media_store -atime +365 -delete` +This will delete media that hasn't been accessed in 365 days. + ## [Purge History API](https://github.com/matrix-org/synapse/blob/master/docs/admin_api/purge_history_api.rst) The purge history API allows server admins to purge historic events from their database, reclaiming disk space.