zulip/scripts
Alex Vandiver 3f60717899 restore-backup: Preserve symlinked uploads and config directories.
When the destination of an extracted file is a symlink to a
directory (e.g. in the docker-zulip container, where
/home/zulip/uploads -> /data/uploads), modern GNU tar replaces the
symlink with a real directory before extracting through it, as a
security precaution.  As a result, uploads (and potentially
configuration files) get restored improper (and, in the case of
docker-zulip, non-persistent) paths.

Pass `--keep-directory-symlink` to both tar invocations so the
extractor follows symlinks-to-directories rather than replacing them.
The non-docker case is unaffected (these paths are real directories
in a standard install), and the security mitigation is not
meaningfully weakened: destinations are pinned to /etc/zulip,
/home/zulip/uploads, and zproject, and the archive is one the
operator just produced.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 00:51:17 +08:00
..
lib install-uv: Upgrade uv from 0.11.7 to 0.11.14. 2026-05-12 16:21:37 -07:00
nagios queue: Allow sharding user_activity worker. 2025-06-06 10:33:20 -07:00
setup restore-backup: Preserve symlinked uploads and config directories. 2026-05-28 00:51:17 +08:00
__init__.py Factor out venv-creating code from provision.py. 2016-06-21 11:25:41 -07:00
get-django-setting python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
log-search log-search: Filter to just authed or unauthed requests. 2026-01-20 17:13:28 -08:00
purge-old-deployments ruff: Partially reformat Python with Ruff 0.9 (2025 style). 2025-01-14 09:42:16 -08:00
README.md docs: Update links in README files for moved directory-structure. 2026-05-13 18:01:30 +05:30
refresh-sharding-and-restart restart-server: --tornado-reshard implies --skip-client-reloads. 2025-10-21 11:38:03 -07:00
reload-clients reload-clients: Ensure that Smokescreen does not interfere with reloads. 2025-08-19 23:39:38 -07:00
restart-server restart-server: All realm Tornado ports need a restart when they change. 2025-10-21 11:38:03 -07:00
start-server scripts: Add a start-server as well. 2021-04-21 10:24:08 -07:00
stop-server stop-server: Accept --help and reject unknown args. 2026-05-21 19:04:48 +05:30
upgrade-zulip upgrade: Modify upgrade scripts to handle failure. 2021-06-23 08:42:20 -07:00
upgrade-zulip-from-git upgrade: Modify upgrade scripts to handle failure. 2021-06-23 08:42:20 -07:00
zulip-puppet-apply scripts: Replace parse_os_release with platform.freedesktop_os_release. 2026-02-10 13:38:28 -08:00

This directory contains scripts that:

  • Generally do not require access to Django or the database (those are "management commands"), and thus are suitable to run operationally.

  • Are useful for managing a production deployment of Zulip (many are also used in a Zulip development environment, though development-only scripts live in tools/).

For more details, see https://zulip.readthedocs.io/en/latest/subsystems/directory-structure.html.