Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

146 lines
6.4 KiB

  1. # SOME DESCRIPTIVE TITLE.
  2. # Copyright (C) 2018-2025, Slavi Pantaleev, Aine Etke, MDAD community members
  3. # This file is distributed under the same license as the matrix-docker-ansible-deploy package.
  4. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
  5. #
  6. #, fuzzy
  7. msgid ""
  8. msgstr ""
  9. "Project-Id-Version: matrix-docker-ansible-deploy \n"
  10. "Report-Msgid-Bugs-To: \n"
  11. "POT-Creation-Date: 2025-01-27 09:54+0200\n"
  12. "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
  13. "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  14. "Language-Team: LANGUAGE <LL@li.org>\n"
  15. "MIME-Version: 1.0\n"
  16. "Content-Type: text/plain; charset=UTF-8\n"
  17. "Content-Transfer-Encoding: 8bit\n"
  18. #: ../../../docs/importing-postgres.md:1
  19. msgid "Importing an existing Postgres database from another installation (optional)"
  20. msgstr ""
  21. #: ../../../docs/importing-postgres.md:3
  22. msgid "Run this if you'd like to import your database from a previous installation. (don't forget to import your Synapse `media_store` files as well — see [the importing-synape-media-store guide](importing-synapse-media-store.md))."
  23. msgstr ""
  24. #: ../../../docs/importing-postgres.md:6
  25. msgid "Prerequisites"
  26. msgstr ""
  27. #: ../../../docs/importing-postgres.md:8
  28. msgid "For this to work, **the database name in Postgres must match** what this playbook uses. This playbook uses a Postgres database name of `synapse` by default (controlled by the `matrix_synapse_database_database` variable). If your database name differs, be sure to change `matrix_synapse_database_database` to your desired name and to re-run the playbook before proceeding."
  29. msgstr ""
  30. #: ../../../docs/importing-postgres.md:10
  31. msgid "The playbook supports importing Postgres dump files in **text** (e.g. `pg_dump > dump.sql`) or **gzipped** formats (e.g. `pg_dump | gzip -c > dump.sql.gz`). Importing multiple databases (as dumped by `pg_dumpall`) is also supported."
  32. msgstr ""
  33. #: ../../../docs/importing-postgres.md:12
  34. msgid "The migration might be a good moment, to \"reset\" a not properly working bridge. Be aware, that it might affect all users (new link to bridge, new rooms, …)"
  35. msgstr ""
  36. #: ../../../docs/importing-postgres.md:14
  37. msgid "Before doing the actual import, **you need to upload your Postgres dump file to the server** (any path is okay)."
  38. msgstr ""
  39. #: ../../../docs/importing-postgres.md:16
  40. msgid "Importing"
  41. msgstr ""
  42. #: ../../../docs/importing-postgres.md:18
  43. msgid "To import, run this command (make sure to replace `SERVER_PATH_TO_POSTGRES_DUMP_FILE` with a file path on your server):"
  44. msgstr ""
  45. #: ../../../docs/importing-postgres.md:26
  46. msgid "**Notes**:"
  47. msgstr ""
  48. #: ../../../docs/importing-postgres.md:28
  49. msgid "`SERVER_PATH_TO_POSTGRES_DUMP_FILE` must be a file path to a Postgres dump file on the server (not on your local machine!)"
  50. msgstr ""
  51. #: ../../../docs/importing-postgres.md:29
  52. msgid "`postgres_default_import_database` defaults to `matrix`, which is useful for importing multiple databases (for dumps made with `pg_dumpall`). If you're importing a single database (e.g. `synapse`), consider changing `postgres_default_import_database` accordingly"
  53. msgstr ""
  54. #: ../../../docs/importing-postgres.md:30
  55. msgid "after importing a large database, it's a good idea to run [an `ANALYZE` operation](https://www.postgresql.org/docs/current/sql-analyze.html) to make Postgres rebuild its database statistics and optimize its query planner. You can easily do this via the playbook by running `just run-tags run-postgres-vacuum -e postgres_vacuum_preset=analyze` (see [Vacuuming PostgreSQL](maintenance-postgres.md#vacuuming-postgresql) for more details)."
  56. msgstr ""
  57. #: ../../../docs/importing-postgres.md:32
  58. msgid "Troubleshooting"
  59. msgstr ""
  60. #: ../../../docs/importing-postgres.md:34
  61. msgid "Table Ownership"
  62. msgstr ""
  63. #: ../../../docs/importing-postgres.md:36
  64. msgid "A table ownership issue can occur if you are importing from a Synapse installation which was both:"
  65. msgstr ""
  66. #: ../../../docs/importing-postgres.md:38
  67. msgid "migrated from SQLite to Postgres, and"
  68. msgstr ""
  69. #: ../../../docs/importing-postgres.md:39
  70. msgid "used a username other than 'synapse'"
  71. msgstr ""
  72. #: ../../../docs/importing-postgres.md:41
  73. msgid "In this case you may run into the following error during the import task:"
  74. msgstr ""
  75. #: ../../../docs/importing-postgres.md:47
  76. msgid "where `synapse_user` is the database username from the previous Synapse installation."
  77. msgstr ""
  78. #: ../../../docs/importing-postgres.md:49
  79. msgid "This can be verified by examining the dump for ALTER TABLE statements which set OWNER TO that username:"
  80. msgstr ""
  81. #: ../../../docs/importing-postgres.md:61
  82. msgid "It can be worked around by changing the username to `synapse`, for example by using `sed`:"
  83. msgstr ""
  84. #: ../../../docs/importing-postgres.md:67
  85. msgid "This uses sed to perform an 'in-place' (`-i`) replacement globally (`/g`), searching for `synapse_user` and replacing with `synapse` (`s/synapse_user/synapse`). If your database username was different, change `synapse_user` to that username instead. Expand search/replace statement as shown in example above, in case of old user name like `matrix` — replacing `matrix` only would… well — you can imagine."
  86. msgstr ""
  87. #: ../../../docs/importing-postgres.md:69
  88. msgid "Note that if the previous import failed with an error it may have made changes which are incompatible with re-running the import task right away; if you do so it may fail with an error such as:"
  89. msgstr ""
  90. #: ../../../docs/importing-postgres.md:75
  91. msgid "Repeat import"
  92. msgstr ""
  93. #: ../../../docs/importing-postgres.md:77
  94. msgid "In this case you can use the command suggested in the import task to clear the database before retrying the import:"
  95. msgstr ""
  96. #: ../../../docs/importing-postgres.md:85
  97. msgid "Now on your local machine run `just run-tags setup-postgres` to prepare the database roles etc."
  98. msgstr ""
  99. #: ../../../docs/importing-postgres.md:87
  100. msgid "If not, you probably get this error. `synapse` is the correct table owner, but the role is missing in database."
  101. msgstr ""
  102. #: ../../../docs/importing-postgres.md:93
  103. msgid "Once the database is clear and the ownership of the tables has been fixed in the SQL file, the import task should succeed."
  104. msgstr ""
  105. #: ../../../docs/importing-postgres.md:95
  106. msgid "Check, if `--dbname` is set to `synapse` (not `matrix`) and replace paths (or even better, copy this line from your terminal)"
  107. msgstr ""
  108. #: ../../../docs/importing-postgres.md:101
  109. msgid "Hints"
  110. msgstr ""
  111. #: ../../../docs/importing-postgres.md:103
  112. msgid "To open psql terminal run `/matrix/postgres/bin/cli`"
  113. msgstr ""