updated keyspace
This commit is contained in:
parent
ede7aeb467
commit
cdbf1e1198
12
dump.sh
12
dump.sh
|
@ -1,8 +1,7 @@
|
||||||
```sh
|
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
KEYSPACE="dev_keyspace"
|
KEYSPACE="dev_keyspace_1"
|
||||||
LOCAL_DIR="data/dumps"
|
LOCAL_DIR="data/dumps"
|
||||||
NODES=("cass-dev-01" "cass-dev-02" "cass-dev-03")
|
NODES=("cass-dev-01" "cass-dev-02" "cass-dev-03")
|
||||||
SSH_USER="alfredo.oliviero"
|
SSH_USER="alfredo.oliviero"
|
||||||
|
@ -36,13 +35,14 @@ snapshot_and_copy() {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
# Export keyspace schema from the first node
|
|
||||||
echo "Exporting keyspace schema for $KEYSPACE from ${NODES[0]}"
|
|
||||||
ssh $SSH_USER@${NODES[0]} "$CQLSH $CQLSH_IP -e \"DESCRIBE KEYSPACE $KEYSPACE;\"" > data/dev_keyspace_schema.cql
|
|
||||||
|
|
||||||
# Create local directory if it doesn't exist
|
# Create local directory if it doesn't exist
|
||||||
mkdir -p $LOCAL_DIR
|
mkdir -p $LOCAL_DIR
|
||||||
|
|
||||||
|
# Export keyspace schema from the first node
|
||||||
|
echo "Exporting keyspace schema for $KEYSPACE from ${NODES[0]}"
|
||||||
|
ssh $SSH_USER@${NODES[0]} "$CQLSH $CQLSH_IP -e \"DESCRIBE KEYSPACE $KEYSPACE;\"" > data/${KEYSPACE}_schema.cql
|
||||||
|
|
||||||
|
|
||||||
# Perform snapshot and copy for each node in parallel
|
# Perform snapshot and copy for each node in parallel
|
||||||
NODE_INDEX=1
|
NODE_INDEX=1
|
||||||
for NODE in "${NODES[@]}"; do
|
for NODE in "${NODES[@]}"; do
|
||||||
|
|
Loading…
Reference in New Issue