From 74fc47b19e278a5fb7eac704efdb294a3a972819 Mon Sep 17 00:00:00 2001
From: clokep The With the Users can reset their password through their client. Alternatively, a server admin
can reset a user's password using the admin API. Deleting your database is unlikely to make anything better. Deleting your database is unlikely to make anything better. It's easy to make the mistake of thinking that you can start again from a clean
slate by dropping your database, but things don't work like that in a federated
network: lots of other servers have information about your server.media_ids
folder contains only the metadata of the media uploaded by the user.
+It does not contain the media itself.
+Furthermore, only the media_ids
that Synapse manages itself are exported.
+If another media repository (e.g. matrix-media-repo)
+is used, the data must be exported separately.media_ids
the media files can be downloaded.
+Media that have been sent in encrypted rooms are only retrieved in encrypted form.
+The following script can help with download the media files:#!/usr/bin/env bash
+
+# Parameters
+#
+# source_directory: Directory which contains the export with the media_ids.
+# target_directory: Directory into which all files are to be downloaded.
+# repository_url: Address of the media repository resp. media worker.
+# serverName: Name of the server (`server_name` from homeserver.yaml).
+#
+# Example:
+# ./download_media.sh /tmp/export_data/media_ids/ /tmp/export_data/media_files/ http://localhost:8008 matrix.example.com
+
+source_directory=$1
+target_directory=$2
+repository_url=$3
+serverName=$4
+
+mkdir -p $target_directory
+
+for file in $source_directory/*; do
+ filename=$(basename ${file})
+ url=$repository_url/_matrix/media/v3/download/$serverName/$filename
+ echo "Downloading $filename - $url"
+ if ! wget -o /dev/null -P $target_directory $url; then
+ echo "Could not download $filename"
+ fi
+done
Manually resetting passwords
I have a problem with my server. Can I just delete my database and start again?
-
There are two exceptions when it might be sensible to delete your database and start again:
server_name
in the homeserver configuration. In effect
this makes your server a completely new one from the point of view of the network,
so in this case it makes sense to start with a clean database.
@@ -228,7 +266,7 @@ so in this case it makes sense to start with a clean database.
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
Synapse tags each log line according to the HTTP request it is processing. When @@ -247,13 +285,13 @@ remember to surround it with triple-backticks (```) to make it legible
See Request log format.
SELECT s.canonical_alias, g.room_id, count(*) AS num_rows
-FROM
- state_groups_state AS g,
- room_stats_state AS s
-WHERE g.room_id = s.room_id
+SELECT s.canonical_alias, g.room_id, count(*) AS num_rows
+FROM
+ state_groups_state AS g,
+ room_stats_state AS s
+WHERE g.room_id = s.room_id
GROUP BY s.canonical_alias, g.room_id
-ORDER BY num_rows desc
+ORDER BY num_rows desc
LIMIT 10;
You can also use the List Room API
--
cgit 1.5.1