diff --git a/develop/print.html b/develop/print.html index 1df6f6b1e8..35c2b2e549 100644 --- a/develop/print.html +++ b/develop/print.html @@ -15185,19 +15185,57 @@ a temporary directory (which starts with "synapse-exfiltrate") in +

The 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.

+

With the 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

Users can reset their password through their client. Alternatively, a server admin can reset a user's password using the admin API.

I have a problem with my server. Can I just delete my database and start again?

-

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.

@@ -15209,7 +15247,7 @@ Come and seek help in https://matrix.to/#/#synapse:matrix.org.

There are two exceptions when it might be sensible to delete your database and start again: