Code Review
/
aaf
/
authz.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
b25099f814a55a1408ebc098a5c553f3950a5da6
[aaf/authz.git]
/
auth
/
auth-cass
/
cass_init
/
pull.sh
1
#!/bin/bash
2
#
3
# Pull data from Cassandra into ".dat" files, and "gzip" them
4
#
5
DIR=/opt/app/aaf/cass_init
6
cd $DIR
7
mkdir -p dats
8
cd dats
9
TABLES="$(cqlsh -e "use authz; describe tables")"
10
for T in $TABLES ; do
11
cqlsh -e "COPY authz.$T TO '$T.dat' WITH DELIMITER='|';"
12
done
13
cd $DIR
14
tar -cvzf dat.gz dats/*.dat
15
rm -Rf dats
16