Better upgrade guide


(Arthur Wiebe) #1

I just finished upgrading from Dgraph 1.0.5 to 1.0.8. And I’m hoping the documentation on upgrading can be improved. Here’s what I did this time.

First I made sure I did an export by calling /admin/export. Then I updated the docker image for zero to 1.0.6 and let it reboot. And then updated docker image for server to 1.0.6 and let it reboot.
The result was zero would no longer start and crashed with “Assert failed”

So I updated all the images straight to 1.0.8, deleted the data directories from each of the 4 pod volumes by hand (3 server and 1 zero)
Rebooted them all and used live loader to import the backup.

This is not a small amount of down-time. How can upgrades be improved in the future so we have minimal down time of the database?


(Daniel Mai) #2

The underlying data format in Dgraph can change between release versions, which is why the docs a data export and importing the data into a new cluster running the updated version.

A way to minimize downtime when upgrading is to do a blue-green deployment for upgrades. That is, keep the original cluster online for clients while setting up a new Dgraph cluster. Once the upgraded cluster is set up, you can redirect clients over to the new cluster and then take down the previous version.


(Arthur Wiebe) #3

Can I just clarify how you would do this. As the new deployment would need to have the data replicated to it. Are you saying you’d do an export/import to the new deployment, or is it possible to do a live replication from the existing deployment?
For eg. would it look like this?

  1. Deploy new dgraph servers that are pointed to the existing zero
  2. Once data is replicated point the servers to an upgraded zero
  3. Clients start connecting to the new servers

Or is there no way to do live replication?


(Daniel Mai) #4

Yes, an export/import. Live replication is not currently a feature.

Don’t connect servers and zeros running different versions. Everything should be the same version within a cluster.