Migrate partial data to a new cockroachdb cluster


#1

Hi,

I am very new to using cockroachdb and would like to have a setup with multiple databases in a single large cluster. Whats the best way to migrate a single database off the main cluster into a new cockroachdb cluster off its own without having any downtime/data loss for the readers/writers?

Thanks,
Hari


(Matt Jibson) #2

Doing a live migration without any downtime is very hard. You can do a three phase process:

  1. Choose a timestamp, run dump as of that timestamp and import into a new database.
  2. Duplicate writes to each + run any catch up.
  3. Once everything is synchronized move over to the new master.

These steps are fairly complicated and have to be tailored to your application. There may be tools that can assist in doing this, but I’m not familiar with any.


#3

Ok thanks for the response @mjibson