summary refs log tree commit diff
path: root/docs/usage/administration/admin_faq.md
diff options
context:
space:
mode:
authorShay <hillerys@element.io>2021-12-02 09:46:20 -0800
committerGitHub <noreply@github.com>2021-12-02 09:46:20 -0800
commit49e1356ee3d5d72929c91f778b3a231726c1413c (patch)
tree23e83690503c49668101b67c069a10b4ba6cebae /docs/usage/administration/admin_faq.md
parentAdd most of the missing type hints to `synapse.federation`. (#11483) (diff)
downloadsynapse-49e1356ee3d5d72929c91f778b3a231726c1413c.tar.xz
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
Diffstat (limited to 'docs/usage/administration/admin_faq.md')
-rw-r--r--docs/usage/administration/admin_faq.md41
1 files changed, 24 insertions, 17 deletions
diff --git a/docs/usage/administration/admin_faq.md b/docs/usage/administration/admin_faq.md
index 162af0c741..3dcad4bbef 100644
--- a/docs/usage/administration/admin_faq.md
+++ b/docs/usage/administration/admin_faq.md
@@ -6,27 +6,31 @@ If your server already has an admin account you should use the user admin API to
 
 If you don't have any admin accounts yet you won't be able to use the admin API so you'll have to edit the database manually. Manually editing the database is generally not recommended so once you have an admin account, use the admin APIs to make further changes.
 
-    UPDATE users SET admin = 1 WHERE name = '@foo:bar.com';
-
+```sql
+UPDATE users SET admin = 1 WHERE name = '@foo:bar.com';
+```
 What servers are my server talking to?
 ---
 Run this sql query on your db:
-
-    SELECT * FROM destinations;
+```sql
+SELECT * FROM destinations;
+```
 
 What servers are currently participating in this room?
 ---
 Run this sql query on your db:
-
-    SELECT DISTINCT split_part(state_key, ':', 2)
-        FROM current_state_events AS c
-        INNER JOIN room_memberships AS m USING (room_id, event_id)
-        WHERE room_id = '!cURbafjkfsMDVwdRDQ:matrix.org' AND membership = 'join';
+```sql
+SELECT DISTINCT split_part(state_key, ':', 2)
+    FROM current_state_events AS c
+    INNER JOIN room_memberships AS m USING (room_id, event_id)
+    WHERE room_id = '!cURbafjkfsMDVwdRDQ:matrix.org' AND membership = 'join';
+```
 
 What users are registered on my server?
 ---
-
-    SELECT NAME from users;
+```sql
+SELECT NAME from users;
+```
 
 Manually resetting passwords:
 ---
@@ -50,13 +54,13 @@ There are two exceptions when it might be sensible to delete your database and s
 I've stuffed up access to my room, how can I delete it to free up the alias?
 ---
 Using the following curl command:
-
-    curl -H 'Authorization: Bearer <access-token>' -X DELETE https://matrix.org/_matrix/client/r0/directory/room/<room-alias>
-
-\<access-token\> - can be obtained in riot by looking in the riot settings, down the bottom is:
+```
+curl -H 'Authorization: Bearer <access-token>' -X DELETE https://matrix.org/_matrix/client/r0/directory/room/<room-alias>
+```
+`<access-token>` - can be obtained in riot by looking in the riot settings, down the bottom is:
 Access Token:\<click to reveal\> 
 
-\<room-alias\> - the room alias, eg. #my_room:matrix.org this possibly needs to be URL encoded also, for example  %23my_room%3Amatrix.org
+`<room-alias>` - the room alias, eg. #my_room:matrix.org this possibly needs to be URL encoded also, for example  %23my_room%3Amatrix.org
 
 How can I find the lines corresponding to a given HTTP request in my homeserver log?
 ---
@@ -93,4 +97,7 @@ WHERE g.room_id = s.room_id
 GROUP BY s.canonical_alias, g.room_id
 ORDER BY num_rows desc 
 LIMIT 10;
-```
\ No newline at end of file
+```
+
+You can also use the [List Room API](../../admin_api/rooms.md#list-room-api)
+and `order_by` `state_events`.