synapse_port_db.1 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. .\" generated with Ronn-NG/v0.8.0
  2. .\" http://github.com/apjanke/ronn-ng/tree/0.8.0
  3. .TH "SYNAPSE_PORT_DB" "1" "July 2021" "" ""
  4. .SH "NAME"
  5. \fBsynapse_port_db\fR \- A script to port an existing synapse SQLite database to a new PostgreSQL database\.
  6. .SH "SYNOPSIS"
  7. \fBsynapse_port_db\fR [\-v] \-\-sqlite\-database=\fIdbfile\fR \-\-postgres\-config=\fIyamlconfig\fR [\-\-curses] [\-\-batch\-size=\fIbatch\-size\fR]
  8. .SH "DESCRIPTION"
  9. \fBsynapse_port_db\fR ports an existing synapse SQLite database to a new PostgreSQL database\.
  10. .P
  11. SQLite database is specified with \fB\-\-sqlite\-database\fR option and PostgreSQL configuration required to connect to PostgreSQL database is provided using \fB\-\-postgres\-config\fR configuration\. The configuration is specified in YAML format\.
  12. .SH "OPTIONS"
  13. .TP
  14. \fB\-v\fR
  15. Print log messages in \fBdebug\fR level instead of \fBinfo\fR level\.
  16. .TP
  17. \fB\-\-sqlite\-database\fR
  18. The snapshot of the SQLite database file\. This must not be currently used by a running synapse server\.
  19. .TP
  20. \fB\-\-postgres\-config\fR
  21. The database config file for the PostgreSQL database\.
  22. .TP
  23. \fB\-\-curses\fR
  24. Display a curses based progress UI\.
  25. .SH "CONFIG FILE"
  26. The postgres configuration file must be a valid YAML file with the following options\.
  27. .IP "\[ci]" 4
  28. \fBdatabase\fR: Database configuration section\. This section header can be ignored and the options below may be specified as top level keys\.
  29. .IP "\[ci]" 4
  30. \fBname\fR: Connector to use when connecting to the database\. This value must be \fBpsycopg2\fR\.
  31. .IP "\[ci]" 4
  32. \fBargs\fR: DB API 2\.0 compatible arguments to send to the \fBpsycopg2\fR module\.
  33. .IP "\[ci]" 4
  34. \fBdbname\fR \- the database name
  35. .IP "\[ci]" 4
  36. \fBuser\fR \- user name used to authenticate
  37. .IP "\[ci]" 4
  38. \fBpassword\fR \- password used to authenticate
  39. .IP "\[ci]" 4
  40. \fBhost\fR \- database host address (defaults to UNIX socket if not provided)
  41. .IP "\[ci]" 4
  42. \fBport\fR \- connection port number (defaults to 5432 if not provided)
  43. .IP "" 0
  44. .IP "\[ci]" 4
  45. \fBsynchronous_commit\fR: Optional\. Default is True\. If the value is \fBFalse\fR, 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
  46. .IP "" 0
  47. .IP "" 0
  48. .P
  49. Following example illustrates the configuration file format\.
  50. .IP "" 4
  51. .nf
  52. database:
  53. name: psycopg2
  54. args:
  55. dbname: synapsedb
  56. user: synapseuser
  57. password: ORohmi9Eet=ohphi
  58. host: localhost
  59. synchronous_commit: false
  60. .fi
  61. .IP "" 0
  62. .SH "COPYRIGHT"
  63. This man page was written by Sunil Mohan Adapa <\fI\%mailto:sunil@medhas\.org\fR> for Debian GNU/Linux distribution\.
  64. .SH "SEE ALSO"
  65. synctl(1), hash_password(1), register_new_matrix_user(1), synapse_review_recent_signups(1)