berngp / docker-zabbix

Docker Container running a Zabbix Server and Zabbix Web UI.
Other
160 stars 66 forks source link

Use external DB for upgrade and backup #19

Open joachimmueller opened 9 years ago

joachimmueller commented 9 years ago

How to upgrade an existing docker image? The Zabbix docs describe the upgrade procedure here:

https://www.zabbix.com/documentation/2.4/manual/installation/upgrade

To do as described it would be necessary to use an external DB with the docker container. This would also enable more easier backup of the zabbix data.

berngp commented 9 years ago

Hi @joachimmueller if you want to do a backup and upgrade the container you can:

  1. stop the container.
  2. Use the approach that docker-backpu suggests to create a backup.
  3. Do docker run --volumes-from=zabbix --entrypoint='' -i -t docker-zabbix shell where zabbix is your Zabbix Docker Container's name and docker-zabbix is the name of the image used by your Zabbix Docker Container. After doing that you will be running in a container that has the same software as your Zabbix Docker Container but you will be inside the Bash Shell and therefore able to execute any MySQL command, which includes upgrading the DB.
azurewraith commented 9 years ago

Just an FYI, the sequence above does not work:

[bcochran@01 ~]$ sudo docker run --volumes-from=zabbix --entrypoint='' -i -t berngp/docker-zabbix /bin/bash
Usage: /bin/docker-zabbix {start|stop|restart|shell|status|summary}
berngp commented 9 years ago

@azurewraith the entrypoint script changed, please execute the command bellow instead.

 sudo docker run --volumes-from=zabbix --entrypoint='' -i -t berngp/docker-zabbix shell
azurewraith commented 9 years ago

Thanks. I ran into #12 running on CoreOS and am attempting to salvage what I can.