From 49e1356ee3d5d72929c91f778b3a231726c1413c Mon Sep 17 00:00:00 2001 From: Shay Date: Thu, 2 Dec 2021 09:46:20 -0800 Subject: Minor cleanup on recently ported doc pages (#11466) * move wiki pages to synapse/docs and add a few titles where necessary * update SUMMARY.md with added pages * add changelog * move incorrectly located newsfragment * update changelog number * snake case added files and update summary.md accordingly * update issue/pr links * update relative links to docs * update changelog to indicate that we moved wiki pages to the docs and state reasoning * requested changes to admin_faq.md * requested changes to database_maintenance_tools.md * requested changes to understanding_synapse_through_graphana_graphs.md * add changelog * fix leftover merge errata * fix unwanted changes from merge * use two spaces between entries * outdent code blocks --- .../administration/database_maintenance_tools.md | 26 ++++------------------ 1 file changed, 4 insertions(+), 22 deletions(-) (limited to 'docs/usage/administration/database_maintenance_tools.md') diff --git a/docs/usage/administration/database_maintenance_tools.md b/docs/usage/administration/database_maintenance_tools.md index 2c29ccfe69..92b805d413 100644 --- a/docs/usage/administration/database_maintenance_tools.md +++ b/docs/usage/administration/database_maintenance_tools.md @@ -5,32 +5,14 @@ This blog post by Victor Berger explains how to use many of the tools listed on ## [Purge Remote Media API](../../admin_api/media_admin_api.md#purge-remote-media-api) 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/local_content -atime +365 -delete -find /path/to/synapse/media_store/local_thumbnails -atime +365 -delete -``` - -This will delete media that hasn't been accessed in 365 days. - -**Warning, 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. +## [Purge Local Media API](../../admin_api/media_admin_api.md#delete-local-media) +This API deletes the *local* media from the disk of your own server. ## [Purge History API](../../admin_api/purge_history_api.md) The purge history API allows server admins to purge historic events from their database, reclaiming disk space. -## [synapse_janitor.sql](https://github.com/xwiki-labs/synapse_scripts) - -- this project is [unmantained and dangerous](https://github.com/xwiki-labs/synapse_scripts#unmaintained-and-dangerous) -- USE WITH CAUTION. It may cause database corruption (see https://github.com/matrix-org/synapse/issues/7305 for example). -- ["Our team hasn't used any of these scripts for some time (possibly years) (...) if anyone wants to volunteer to maintain this repo I'd be happy to transfer ownership.](https://github.com/xwiki-labs/synapse_scripts/pull/12#issuecomment-617275345) - -Cleans a synapse Postgres database of deleted messages and abandoned rooms. - ## [synapse-compress-state](https://github.com/matrix-org/rust-synapse-compress-state) Tool for compressing (deduplicating) `state_groups_state` table. -## [SQL for analyzing Synapse PostgreSQL database stats](https://github.com/matrix-org/synapse/wiki/SQL-for-analyzing-Synapse-PostgreSQL-database-stats) -Some easy SQL that reports useful stat about Matrix Synapse database. \ No newline at end of file +## [SQL for analyzing Synapse PostgreSQL database stats](useful_sql_for_admins.md) +Some easy SQL that reports useful stats about your Synapse database. \ No newline at end of file -- cgit 1.5.1