Back up Synapse with pg_dump, protect its signing key and media, and restore into a clean PostgreSQL database without reusing stale one-time keys.
Don't be afraid of using your chosen database's command-line client. I might as well say this up front: I don't like using GUI (aka non-command-line or graphical) tools with my databases. This is ...