zulip/scripts/setup
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
..
apt-repos install: Support Ubuntu 26.04. 2026-04-22 22:00:04 -07:00
__init__.py setup: Add missing __init__.py. 2021-07-05 12:20:39 -07:00
compare-settings-to-template ruff: Fix UP007 Use X | Y for type annotations. 2024-07-13 22:28:22 -07:00
configure-rabbitmq configure-rabbitmq: Restore startup retry loop. 2025-05-15 16:59:27 -07:00
create-database create-database: Skip stop-server and flush-memcached on standalone Pg. 2024-04-04 16:48:58 -07:00
create-db.sql migrations: Move schema creation and search_path into pre_migrate hook. 2025-12-16 13:03:27 -08:00
create-pgroonga.sql pgroonga: Remove now-unnecessary 'GRANT USAGE' statement. 2023-06-23 14:40:27 -07:00
flush-memcached requirements: Upgrade Python requirements. 2026-04-17 15:04:02 -07:00
generate_secrets.py settings: Enable Altcha in development if on localhost. 2025-07-25 22:29:51 -07:00
generate-rabbitmq-cookie CVE-2021-43799: Set a secure Erlang cookie. 2022-01-25 02:13:53 +00:00
generate-self-signed-cert generate-self-signed-cert: Remove RANDFILE. 2022-02-25 14:49:07 -08:00
initialize-database checks: Move checkconfig to standard check framework. 2025-11-19 11:50:18 -08:00
install install: Use a period at end of root error message. 2021-06-23 08:42:46 -07:00
pgroonga-config pgroonga: Do not attempt to configure pgroonga without a database. 2023-09-22 11:45:00 -07:00
reindex-textual-data reindex-textual-data: Remove PostgreSQL ≥ 11 check. 2024-11-01 15:33:31 -07:00
restore-backup restore-backup: Preserve symlinked uploads and config directories. 2026-05-28 00:51:17 +08:00
setup-certbot setup-certbot: Puppet guarantees the certbot package. 2025-11-26 11:33:27 -08:00
sha256-file-to puppet: Add a sha256_file_to. 2023-02-10 15:53:10 -08:00
sha256-tarball-to sha256-tarball-to: Support zipfiles. 2025-03-27 21:56:54 -07:00
terminate-psql-sessions terminate-psql-sessions: Rely on the caller to set PGHOST, PGUSER. 2020-06-15 21:37:14 -07:00
upgrade-postgresql setup-upgrade-postgresql: Add missing --file flag to execute SQL in a file 2026-02-17 10:57:33 -05:00