Demonstrates backing up a 3 node cluster to a remote file server using NGINX. The relevant documentation can be found here:
- https://www.cockroachlabs.com/docs/stable/backup-and-restore.html
- https://www.cockroachlabs.com/docs/stable/backup.html
- https://www.cockroachlabs.com/docs/stable/create-a-file-server.html
crdb-0
- CockroachDB nodecrdb-1
- CockroachDB nodecrdb-2
- CockroachDB nodelb
- HAProxy acting as load balancerfileserver
- NGINX acting as remote file server
- because operation order is important, execute
./up.sh CRDB_ORG CRDB_LICENSE_KEY
instead ofdocker compose up
whereCRDB_ORG
is your CockroachDB Enterprise License Organization andCRDB_LICENSE_KEY
is your CockroachDB Enterprise License Key. - visit the CockroachDB UI @ http://localhost:8080
- visit the HAProxy UI @ http://localhost:8081
- run the following command to view the contents of the
backup
directory...docker exec -t fileserver ls -la /mnt/cockroach-backups/bank-backup
docker compose exec crdb-0 /bin/bash
docker compose exec crdb-1 /bin/bash
docker compose exec crdb-2 /bin/bash
docker compose exec lb /bin/sh
docker compose exec fileserver /bin/sh