synapse_port_db.ronn 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. synapse_port_db(1) -- A script to port an existing synapse SQLite database to a new PostgreSQL database.
  2. =============================================
  3. ## SYNOPSIS
  4. `synapse_port_db` [-v] --sqlite-database=<dbfile> --postgres-config=<yamlconfig> [--curses] [--batch-size=<batch-size>]
  5. ## DESCRIPTION
  6. **synapse_port_db** ports an existing synapse SQLite database to a new
  7. PostgreSQL database.
  8. SQLite database is specified with `--sqlite-database` option and
  9. PostgreSQL configuration required to connect to PostgreSQL database is
  10. provided using `--postgres-config` configuration. The configuration
  11. is specified in YAML format.
  12. ## OPTIONS
  13. * `-v`:
  14. Print log messages in `debug` level instead of `info` level.
  15. * `--sqlite-database`:
  16. The snapshot of the SQLite database file. This must not be
  17. currently used by a running synapse server.
  18. * `--postgres-config`:
  19. The database config file for the PostgreSQL database.
  20. * `--curses`:
  21. Display a curses based progress UI.
  22. ## CONFIG FILE
  23. The postgres configuration file must be a valid YAML file with the
  24. following options.
  25. * `database`:
  26. Database configuration section. This section header can be
  27. ignored and the options below may be specified as top level
  28. keys.
  29. * `name`:
  30. Connector to use when connecting to the database. This value must
  31. be `psycopg2`.
  32. * `args`:
  33. DB API 2.0 compatible arguments to send to the `psycopg2` module.
  34. * `dbname` - the database name
  35. * `user` - user name used to authenticate
  36. * `password` - password used to authenticate
  37. * `host` - database host address (defaults to UNIX socket if not
  38. provided)
  39. * `port` - connection port number (defaults to 5432 if not
  40. provided)
  41. * `synchronous_commit`:
  42. Optional. Default is True. If the value is `False`, enable
  43. asynchronous commit and don't wait for the server to call fsync
  44. before ending the transaction. See:
  45. https://www.postgresql.org/docs/current/static/wal-async-commit.html
  46. Following example illustrates the configuration file format.
  47. database:
  48. name: psycopg2
  49. args:
  50. dbname: synapsedb
  51. user: synapseuser
  52. password: ORohmi9Eet=ohphi
  53. host: localhost
  54. synchronous_commit: false
  55. ## COPYRIGHT
  56. This man page was written by Sunil Mohan Adapa <<sunil@medhas.org>> for
  57. Debian GNU/Linux distribution.
  58. ## SEE ALSO
  59. synctl(1), hash_password(1), register_new_matrix_user(1), synapse_review_recent_signups(1)