summaryrefslogtreecommitdiffstats
path: root/auth/auth-cass/docker/backup.sh
diff options
context:
space:
mode:
authorvarun gudisena <vg411h@att.com>2018-08-17 18:42:13 +0000
committerGerrit Code Review <gerrit@onap.org>2018-08-17 18:42:13 +0000
commit31f5882433bc419bdedd47f7e973bb5a98d31538 (patch)
treedba3bdc993f68499e81e455206db487c1f18e264 /auth/auth-cass/docker/backup.sh
parentb96e59383a20b356d0d4c83dab0303c58b189f53 (diff)
parentb8363e0ea7cdf544fb42078593ded352497e4b0d (diff)
Merge "Backup Script for Cass"
Diffstat (limited to 'auth/auth-cass/docker/backup.sh')
-rw-r--r--auth/auth-cass/docker/backup.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/auth/auth-cass/docker/backup.sh b/auth/auth-cass/docker/backup.sh
new file mode 100644
index 00000000..31a12141
--- /dev/null
+++ b/auth/auth-cass/docker/backup.sh
@@ -0,0 +1,11 @@
+
+DIR=$(date +%Y%m%d)
+echo $DIR
+mkdir -p $DIR
+docker container cp cbackup.sh aaf_cass:/opt/app/cass_backup
+docker container exec -it aaf_cass bash -e '/opt/app/cass_backup/cbackup.sh'
+docker container cp aaf_cass:/opt/app/cass_backup/ $DIR/
+mv $DIR/cass_backup/*.dat $DIR
+tar -cvzf $DIR.gz $DIR
+rm -Rf $DIR
+