diff options
Diffstat (limited to 'demo/docker_files/dump_mr_state.sh')
-rw-r--r-- | demo/docker_files/dump_mr_state.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/demo/docker_files/dump_mr_state.sh b/demo/docker_files/dump_mr_state.sh new file mode 100644 index 0000000..75c16d6 --- /dev/null +++ b/demo/docker_files/dump_mr_state.sh @@ -0,0 +1,10 @@ +#!/bin/bash + + +TIMESTAMP=`date +%Y%m%d%H%M` +CONTAINERID=`docker ps |grep kafka |cut -b1-12` +docker cp $CONTAINERID:/kafka ./data-kafka-$TIMESTAMP +tar zcvf ./data-kafka-$TIMESTAMP.tgz ./data-kafka-$TIMESTAMP +CONTAINERID=`docker ps |grep zookeeper |cut -b1-12` +docker cp $CONTAINERID:/opt/zookeeper-3.4.9/data ./data-zookeeper-$TIMESTAMP +tar zcvf ./data-zookeeper-$TIMESTAMP.tgz ./data-zookeeper-$TIMESTAMP |