summaryrefslogtreecommitdiffstats
path: root/auth/auth-cass/cass_init/pull.sh
diff options
context:
space:
mode:
Diffstat (limited to 'auth/auth-cass/cass_init/pull.sh')
-rw-r--r--auth/auth-cass/cass_init/pull.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/auth/auth-cass/cass_init/pull.sh b/auth/auth-cass/cass_init/pull.sh
new file mode 100644
index 00000000..94695ed1
--- /dev/null
+++ b/auth/auth-cass/cass_init/pull.sh
@@ -0,0 +1,16 @@
+#!/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
+