SYNAPSE_PORT_DB(1)
π SYNAPSE_PORT_DB β the porting glow-up π
Okay bestie, so this is synapse_port_db, a script from the SYNAPSE_PORT_DB(1) manual, and it is literally the thing that moves your existing synapse SQLite database over to a shiny new PostgreSQL database. Glow-up era β¨
πΈ SYNOPSIS πΈ
synapse_port_db [-v] --sqlite-database=dbfile
--postgres-config=yamlconfig [--curses] [--batch-size=batch-size]
π¦ DESCRIPTION π¦
So synapse_port_db ports an existing synapse SQLite database to a new PostgreSQL database. That's it, that's the whole vibe. π
You tell it which SQLite database you're working with using the --sqlite-database option, and then you hand it the PostgreSQL configuration it needs to actually connect to the PostgreSQL database via --postgres-config. That configuration is specified in YAML format β yes, YAML, we love a structured moment. π
β¨ OPTIONS β¨
-vβ Print log messages at debug level instead of info level. Not me wanting all the tea in the logs π₯--sqlite-databaseβ The snapshot of the SQLite database file. Heads up though: this must not be currently used by a running synapse server. Like, nobody else can be touching it, okay? π--postgres-configβ The database config file for the PostgreSQL database. Give it the YAML and it's off π--cursesβ Display a curses based progress UI. Aesthetic progress bar energy, honestly iconic β¨
π CONFIG FILE π
The postgres configuration file must be a valid YAML file with the following options. Let's break it down, bestie π«Ά
database: Database configuration section. This section header can be ignored and the options below may be specified as top level keys. (So yes, you can skip the wrapper if that's more your vibe π )name: Connector to use when connecting to the database. This value must bepsycopg2. No substitutions, no cap. βargs: DB API 2.0 compatible arguments to send to thepsycopg2module. Inside of which:dbnameβ the database nameuserβ user name used to authenticatepasswordβ password used to authenticatehostβ database host address (defaults to UNIX socket if not provided)portβ connection port number (defaults to5432if not provided)
synchronous_commit: Optional. Default isTrue. If the value isFalse, enable asynchronous commit and donΒ΄t wait for the server to call fsync before ending the transaction. See:https://www.postgresql.org/docs/current/static/wal-async-commit.htmlπ§
Following example illustrates the configuration file format.
database:
name: psycopg2
args:
dbname: synapsedb
user: synapseuser
password: ORohmi9Eet=ohphi
host: localhost
synchronous_commit: false
Lowkey obsessed with how clean that YAML looks ngl πΈ
π COPYRIGHT π
This man page was written by Sunil Mohan Adapa <mailto:sunil@medhas.org> for Debian GNU/Linux distribution. Shoutout to Sunil, we stan π
β SEE ALSO β
synctl(1), hash_password(1), register_new_matrix_user(1), synapse_review_recent_signups(1) β go read those too, iykyk π
And that's the whole page, bestie β brought to you by the SYNAPSE_PORT_DB(1) manual, July 2021, SYNAPSE_PORT_DB(1) energy all the way through. Periodt. π
ππ¦
π¦ where this page comes from
- opensuse-leap 16.0: matrix-synapse 1.132.0-bp160.1.4 Β· AGPL-3.0-or-later
- opensuse-leap 16.0: matrix-synapse 1.132.0-bp160.1.4 Β· AGPL-3.0-or-later
- opensuse-leap 16.0: matrix-synapse 1.132.0-bp160.1.4 Β· AGPL-3.0-or-later
- opensuse-leap 16.0: matrix-synapse 1.132.0-bp160.1.4 Β· AGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms