mirror of
https://github.com/zulip/zulip.git
synced 2025-11-12 18:06:44 +00:00
backup: Dereference symlinks when building tarball.
In docker-zulip installs, /etc/zulip/zulip.conf,
/etc/zulip/zulip-secrets.conf, and /home/zulip/uploads are all
symlinks into the `/data` directory which is mounted as a Docker
Volume. By default, `tar` does not dereference symlinks, leading to
backups that are missing these critical pieces.
Add `-h` to the `tar` invocation, to follow symlinks, so backups in
Docker have all of their pieces. Since none of the contents of the
backup intentionally use symlinks, this is safe.
Co-authored-by: Alex Vandiver <alexmv@zulip.com>
(cherry picked from commit d4b30e9e9d)
This commit is contained in:
@@ -133,7 +133,7 @@ class Command(ZulipBaseCommand):
|
||||
[
|
||||
"tar",
|
||||
f"--directory={tmp}",
|
||||
"-cPzf",
|
||||
"-cPhzf",
|
||||
tarball_path,
|
||||
*transform_args,
|
||||
"--",
|
||||
|
||||
Reference in New Issue
Block a user