blob: 94695ed19a008c74f95595a45fc188281f6f0a63 [file] [log] [blame]
#!/bin/bash
#
# Pull data from Cassandra into ".dat" files, and "gzip" them
#
DIR=/opt/app/aaf/cass_init
cd $DIR
mkdir -p dats
cd dats
TABLES="$(cqlsh -e "use authz; describe tables")"
for T in $TABLES ; do
cqlsh -e "use authz; COPY $T TO '$T.dat' WITH DELIMITER='|';"
done
cd $DIR
tar -cvzf dat.gz dats/*.dat
rm -Rf dats