synapse_port_db.1 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. .\" generated with Ronn/v0.7.3
  2. .\" http://github.com/rtomayko/ronn/tree/0.7.3
  3. .
  4. .TH "SYNAPSE_PORT_DB" "1" "February 2017" "" ""
  5. .
  6. .SH "NAME"
  7. \fBsynapse_port_db\fR \- A script to port an existing synapse SQLite database to a new PostgreSQL database\.
  8. .
  9. .SH "SYNOPSIS"
  10. \fBsynapse_port_db\fR [\-v] \-\-sqlite\-database=\fIdbfile\fR \-\-postgres\-config=\fIyamlconfig\fR [\-\-curses] [\-\-batch\-size=\fIbatch\-size\fR]
  11. .
  12. .SH "DESCRIPTION"
  13. \fBsynapse_port_db\fR ports an existing synapse SQLite database to a new PostgreSQL database\.
  14. .
  15. .P
  16. 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\.
  17. .
  18. .SH "OPTIONS"
  19. .
  20. .TP
  21. \fB\-v\fR
  22. Print log messages in \fBdebug\fR level instead of \fBinfo\fR level\.
  23. .
  24. .TP
  25. \fB\-\-sqlite\-database\fR
  26. The snapshot of the SQLite database file\. This must not be currently used by a running synapse server\.
  27. .
  28. .TP
  29. \fB\-\-postgres\-config\fR
  30. The database config file for the PostgreSQL database\.
  31. .
  32. .TP
  33. \fB\-\-curses\fR
  34. Display a curses based progress UI\.
  35. .
  36. .SH "CONFIG FILE"
  37. The postgres configuration file must be a valid YAML file with the following options\.
  38. .
  39. .IP "\(bu" 4
  40. \fBdatabase\fR: Database configuration section\. This section header can be ignored and the options below may be specified as top level keys\.
  41. .
  42. .IP "\(bu" 4
  43. \fBname\fR: Connector to use when connecting to the database\. This value must be \fBpsycopg2\fR\.
  44. .
  45. .IP "\(bu" 4
  46. \fBargs\fR: DB API 2\.0 compatible arguments to send to the \fBpsycopg2\fR module\.
  47. .
  48. .IP "\(bu" 4
  49. \fBdbname\fR \- the database name
  50. .
  51. .IP "\(bu" 4
  52. \fBuser\fR \- user name used to authenticate
  53. .
  54. .IP "\(bu" 4
  55. \fBpassword\fR \- password used to authenticate
  56. .
  57. .IP "\(bu" 4
  58. \fBhost\fR \- database host address (defaults to UNIX socket if not provided)
  59. .
  60. .IP "\(bu" 4
  61. \fBport\fR \- connection port number (defaults to 5432 if not provided)
  62. .
  63. .IP "" 0
  64. .
  65. .IP "\(bu" 4
  66. \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
  67. .
  68. .IP "" 0
  69. .
  70. .IP "" 0
  71. .
  72. .P
  73. Following example illustrates the configuration file format\.
  74. .
  75. .IP "" 4
  76. .
  77. .nf
  78. database:
  79. name: psycopg2
  80. args:
  81. dbname: synapsedb
  82. user: synapseuser
  83. password: ORohmi9Eet=ohphi
  84. host: localhost
  85. synchronous_commit: false
  86. .
  87. .fi
  88. .
  89. .IP "" 0
  90. .
  91. .SH "COPYRIGHT"
  92. This man page was written by Sunil Mohan Adapa <\fIsunil@medhas\.org\fR> for Debian GNU/Linux distribution\.
  93. .
  94. .SH "SEE ALSO"
  95. synctl(1), hash_password(1), register_new_matrix_user(1)