How do I create backups of my entire cluster? Can they only be imported back into CockroachDB or can they also be imported into other systems?
CockroachDB support generating a snapshot of your entire cluster with the cockroach dump
command. This creates a human-readable output of SQL statements that can be easily imported into other databases, if so desired. Here’s an example of dumping two tables from the same database:
cockroach dump db1 tbl1 tbl2 > db1_backup.sql
We’re also working on a much more performant, efficient backup-and-restore functionality for our upcoming 1.0 release. The files from the new backup functionality will only be restorable into CockroachDB, however.
the "more performant efficient backup-and-restore functionality" Alex mentioned has been available for awhile now. documentation is here:
https://www.cockroachlabs.com/docs/stable/backup.html
Cockroach Labs calls the open source version of the database "Cockroach Core", so open source users should note the caveat at the top of the page:
"Core users can only take full backups. To use the other backup features, you need an enterprise license."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With