docker-zulip
docker-zulip copied to clipboard
Migrating Zulip from Standard (non-docker) version to Docker version
I have version 2.1.12 running on ubuntu 18.04 old VPS and memory wise etc, it is struggling to keep up. I have a newer one with loads more memory, but I do not want it to be Zulip only, and a "standard" Zulip install tends to take over so much of the server and makes the whole environment somewhat delicate.. I hope you can get what I say here.
So, then when I see there is a docker version of Zulip I got really excited.
I finally today got Docker version to install (behind an Nginx reverse proxy that hosts many services), right up to the setup page that asks for login. That was cool.
Next step, is to migrate my old server "standard" Zulip to Docker Zulip, but cannot work out how to do that. I followed this backup and restore process: https://zulip.readthedocs.io/en/latest/production/export-and-import.html#backups But it assumes that db server and zulip are all in the same container, which they are not.. and fails with these errors:
root@c083413a80e4:/# /home/zulip/deployments/current/scripts/setup/restore-backup zulip-backup-2020-01-18-22-19-14-xf73rm7e.tar.gz
- tar -C /tmp/zulip-restore-backup-kkr3sr2_ '--transform=s|^zulip-backup/settings(/.)?$|/etc/zulip\1|x' '--transform=s|^zulip-backup/zproject(/.)?$|/home/zulip/deployments/2020-01-18-14-34-01/zproject\1|x' '--transform=s|^zulip-backup/uploads(/.*)?$|/home/zulip/uploads\1|x' -xPz
- chown -R postgres -- /tmp/zulip-restore-backup-kkr3sr2_ chown: invalid user: ‘postgres’
Error running a subcommand of /home/zulip/deployments/current/scripts/setup/restore-backup: chown -R postgres -- /tmp/zulip-restore-backup-kkr3sr2_ Actual error output for the subcommand is just above this.
Traceback (most recent call last): File "/home/zulip/deployments/current/scripts/setup/restore-backup", line 145, in
restore_backup(tarball_file) File "/home/zulip/deployments/current/scripts/setup/restore-backup", line 87, in restore_backup run(["chown", "-R", POSTGRES_USER, "--", tmp]) File "/home/zulip/deployments/current/scripts/lib/zulip_tools.py", line 200, in run subprocess.check_call(args, **kwargs) File "/usr/lib/python3.6/subprocess.py", line 311, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['chown', '-R', 'postgres', '--', '/tmp/zulip-restore-backup-kkr3sr2_']' returned non-zero exit status 1.
I cannot be the first person (I hope!) to attempt this.. is there something I am missing, something simple or some guide on how to do this?
So I answered this for myself, and will leave the answer here for any others who are looking for it. You cannot use the "backup / restore" function above, you must use the "export/restore" function here: https://zulip.readthedocs.io/en/latest/production/export-and-import.html#data-export This worked well. Will close this now.
This is something that should be supported with the backup tool; I'm reopening this as we'd like to fix that.
Great. If I can help testing etc let me know. Any downside to the method I used?
Hi @timabbott please let me know if there is something I can do
@maltokyo sorry for the slow reply! We've addressed part of this via making manage.py backup
work inside docker-zulip
on Zulip 2.1.3. We still need to do more work to support restore.
I think @hackerkid has some work towards finishing this.
Great news!!
Yeah. https://github.com/zulip/zulip/pull/13804 is PR. @timabbott Its ready for another round of review.