Go to file
Alex Vandiver 3a8b4b0205 backup: Call the pg_dump binary whose version we are running.
`/usr/bin/pg_dump` on Ubuntu and Debian is actually a tool which
attempts to choose which `pg_dump` binary from all of the
`postgresql-client-*` packages that are installed to run.  However,
its logic is confused by passing empty `--host` and `--port` options
-- instead of looking at the running server instance on the server, it
instead assumes some remote host and chooses the highest versioned
`pg_dump` which is installed.

Because Zulip writes binary database backups, they are sensitive to
the version of the client `pg_dump` binary is used -- and the output
may not be backwards compatible.  Using a PostgreSQL 16 `pg_dump`
writes archive format 1.15, which cannot be read by a PostgreSQL 15
`pg_restore`.

Zulip does not currently support PostgreSQL 16 as a server.  This
means that backups on servers with `postgresql-client-16` installed
did not successfully round-trip Zulip backups -- their backups are
written using PostgreSQL 16's client, and the `pg_restore` chosen on
restore was correctly chosen as the one whose version matched the
server (PostgreSQL 15 or below), and thus did not understand the new
archive format.

Existing `./manage.py backups` taken since `postgresql-client-16` were
installed are thus not directly usable by the `restore-backup` script.
They are not useless, however, since they can theoretically be
converted into a format readable by PostgreSQL 15 -- by importing into
a PostgreSQL 16 instance, and re-dumping with a PostgreSQL 15
`pg_dump`.

Fix this issue by hard-coding path to the binary whose version matches
the version of the server we are connected to.  This may theoretically
fail if we are connected to a remote PostgreSQL instance and we do not
have a `postgresql-client` package locally installed which matches the
remote PostgreSQL server's version.  However, choosing a matching
version is the only way to ensure that it will be able to be imported
cleanly -- and it is preferable that we fail the backup process rather
than write backups that we cannot easily restore from.

Fixes: #27160.
2023-10-11 11:50:56 -07:00
.github ci: Temporarily upgrade postgresql-client-common before upgrading. 2023-09-15 07:50:17 -07:00
.tx provision: Replace transifex-client with new transifex-cli. 2022-12-13 12:34:08 -08:00
.vscode vscode: Recommend remote development extension. 2021-11-03 16:03:46 -07:00
analytics analytics: Remove out of date tabs from main activity page. 2023-10-05 12:31:57 -07:00
api_docs typing_indicator: Update the 'to' parameter to accept stream ID. 2023-10-10 17:15:28 -07:00
confirmation python: Annotate type aliases with TypeAlias. 2023-08-07 10:02:49 -07:00
corporate stripe: Set .api_version to make integration work again. 2023-10-10 16:44:28 -07:00
docs typing_data: Rename get_all_typists to get_all_direct_message_typists. 2023-10-10 17:36:55 -07:00
help help: Tighten content on /help/printing-messages. 2023-10-10 18:27:48 -07:00
locale i18n: Update translation data from Transifex. 2023-10-01 14:35:25 -07:00
patches dependencies: Patch source-sans to correct format() for variable fonts. 2023-09-13 17:08:53 -07:00
pgroonga migrations: Import BaseDatabaseSchemaEditor from its canonical module. 2023-03-05 14:46:28 -08:00
puppet docs: Fix grammar errors found by mwic. 2023-10-09 13:24:09 -07:00
requirements requirements: Upgrade Python requirements. 2023-10-09 11:55:16 -07:00
scripts install-node: Upgrade Node.js from 18.17.1 to 18.18.0. 2023-10-09 14:16:23 -07:00
static hello: Redesign page. 2023-10-02 22:30:03 -07:00
stubs/taint actions: Split out zerver.actions.message_send. 2022-04-14 17:14:34 -07:00
templates signup: Add link to redirect user to login page in the form. 2023-10-09 14:36:54 -07:00
tools stream_edit_toggler: Convert module to TypeScript. 2023-10-10 18:26:57 -07:00
var/puppeteer puppeteer_tests: Port to TypeScript. 2021-02-22 16:03:10 -08:00
web settings: Adjust label for stream typing notifications setting. 2023-10-11 10:16:24 -07:00
zerver backup: Call the pg_dump binary whose version we are running. 2023-10-11 11:50:56 -07:00
zilencer zilencer: Handle very old server push notifications. 2023-10-04 17:29:34 -07:00
zproject zerver: Implement ldap group synchronization. 2023-10-05 16:12:52 -07:00
.codecov.yml
.codespellignore codespell: Fix newly found typos. 2023-04-03 22:39:21 -07:00
.editorconfig editorconfig: Restore indent_size = 2 for Markdown. 2021-08-20 23:14:37 -07:00
.eslintignore web: Move web app to ‘web’ directory. 2023-02-23 16:04:17 -08:00
.eslintrc.json eslint: Enable import/no-cycle rule. 2023-10-10 12:09:15 -07:00
.gitattributes .gitattributes: Mark *.bmp, *.bson, *.mp3, *.pdf as binary. 2022-02-07 18:51:06 -08:00
.gitignore hello: Redesign page. 2023-10-02 22:30:03 -07:00
.gitlint lint: Update line-length for commit message to 72 in gitlint. 2023-05-01 10:35:52 -07:00
.mailmap mailmap: Put sorted list back in order. 2023-08-02 17:19:05 -07:00
.npmignore
.npmrc dependencies: Switch to pnpm. 2023-03-20 15:48:29 -07:00
.prettierignore dependencies: Switch to pnpm. 2023-03-20 15:48:29 -07:00
.pyre_configuration
.readthedocs.yaml readthedocs: Add a configuration file. 2023-02-03 16:36:54 -08:00
.sonarcloud.properties
CODE_OF_CONDUCT.md docs: Rename "private message" -> "direct message". 2023-06-23 14:36:16 -07:00
CONTRIBUTING.md docs: Add a note about "good first issue" label to contributing guide. 2023-10-02 09:15:53 -07:00
Dockerfile-postgresql docs: Fix grammar errors found by mwic. 2023-10-09 13:24:09 -07:00
LICENSE license: Move copyright notice from LICENSE to NOTICE. 2021-02-05 09:28:12 -08:00
NOTICE docs: Bump copyright year. 2021-02-05 09:28:15 -08:00
README.md README: Update Ruff badge. 2023-03-21 11:46:20 -07:00
SECURITY.md docs: Update .html links pointing to "Upgrade Zulip" or "Modify Zulip". 2023-08-11 16:49:32 -07:00
Vagrantfile vagrant: Add Fedora 36 support. 2022-09-08 16:12:59 -07:00
manage.py ruff: Fix PERF401 Use a list comprehension to create a transformed list. 2023-08-07 17:23:55 -07:00
package.json dependencies: Upgrade JavaScript dependencies. 2023-10-09 14:16:23 -07:00
pnpm-lock.yaml dependencies: Upgrade JavaScript dependencies. 2023-10-09 14:16:23 -07:00
prettier.config.js prettier: Disable embedded language formatting for Markdown. 2021-08-20 23:14:37 -07:00
pyproject.toml ruff: Enable B023 Function definition does not bind loop variable. 2023-09-11 18:03:45 -07:00
stylelint.config.js dependencies: Upgrade JavaScript dependencies. 2023-07-21 15:58:42 -07:00
tsconfig.json dependencies: Install `@types/jquery.validation for type annotation. 2023-08-14 16:00:20 -07:00
version.py typing_indicator: Replace private with direct in 'message_type' field. 2023-10-10 17:15:28 -07:00

README.md

Zulip overview

Zulip is an open-source team collaboration tool with unique topic-based threading that combines the best of email and chat to make remote work productive and delightful. Fortune 500 companies, leading open source projects, and thousands of other organizations use Zulip every day. Zulip is the only modern team chat app that is designed for both live and asynchronous conversations.

Zulip is built by a distributed community of developers from all around the world, with 74+ people who have each contributed 100+ commits. With over 1000 contributors merging over 500 commits a month, Zulip is the largest and fastest growing open source team chat project.

Come find us on the development community chat!

GitHub Actions build status coverage status Mypy coverage Ruff code style: black code style: prettier GitHub release docs Zulip chat Twitter GitHub Sponsors

Getting started

You may also be interested in reading our blog, and following us on Twitter and LinkedIn.

Zulip is distributed under the Apache 2.0 license.