diff --git a/Synapse-database-maintenance-tools.md b/Synapse-database-maintenance-tools.md index 6e748c1..53f0dfb 100644 --- a/Synapse-database-maintenance-tools.md +++ b/Synapse-database-maintenance-tools.md @@ -5,7 +5,11 @@ 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. **Warning 1, check noatime flag**: You also have to double-check that the filesystem where synapse's media store don't have [noatime flag](https://unix.stackexchange.com/questions/219015/how-to-disable-access-time-settings-in-debian-linux/219017#219017). Check it with `mount`, `noatime` is something that is usually enabled by default to reduce read-write operations in the filesystem for a feature is not so demanded. **Warning 2, what contents**, the next command applies to `local_content local_thumbnails remote_content remote_thumbnail` (that are the subdirectories of media directory), remote content should use [Purge History API](https://github.com/matrix-org/synapse/blob/master/docs/admin_api/purge_history_api.rst), and maybe you want to delete just the `local_content` ? +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. + +**Warning 1, check noatime flag**: You also have to double-check that the filesystem where synapse's media store don't have [noatime flag](https://unix.stackexchange.com/questions/219015/how-to-disable-access-time-settings-in-debian-linux/219017#219017). Check it with `mount`, `noatime` is something that is usually enabled by default to reduce read-write operations in the filesystem for a feature is not so demanded. + +**Warning 2, what contents**, the next command applies to `local_content local_thumbnails remote_content remote_thumbnail` (that are the subdirectories of media directory), remote content should use [Purge History API](https://github.com/matrix-org/synapse/blob/master/docs/admin_api/purge_history_api.rst), and maybe you want to delete just the `local_content` ? `find /path/to/synapse/media_store -atime +365 -delete`