From e1b0a118d8d7ce92d01282b85a72edc87d39fe27 Mon Sep 17 00:00:00 2001 From: Ignatious Johnson Christopher Date: Fri, 5 Aug 2016 18:07:13 -0700 Subject: [PATCH] Make sure all keyspaces are restored, if not error out so that the user is aware of the issue. Change-Id: I366ffd56d85ea6c31bb2eef6bdb163b6a409bf84 Closes-bug: 1610486 --- src/config/utils/cass-db-restore.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/config/utils/cass-db-restore.sh b/src/config/utils/cass-db-restore.sh index dc558260b31..c1f33f59558 100755 --- a/src/config/utils/cass-db-restore.sh +++ b/src/config/utils/cass-db-restore.sh @@ -97,7 +97,7 @@ fi IFS=, skip_keyspaces_list=($skip_keyspaces) -data_dirs="`find $ss_dir -name $ss` " +data_dirs="`find $ss_dir -name $ss`" # Get directories with snapshots # expected format ss_dir/keyspace_dir/column_family_dir/snapshots/*.db # reverse output dirs & cut 3 fields of interest @@ -166,6 +166,11 @@ do mkdir -p $dest_path fi cp $src_path/*.db $dest_path + if [ $? -ne 0 ] + then + echo "=====ERROR: Unable to restore $src_path/*.db to $dest_path=====" + exit 1 + fi echo "=======check $dest_path ===============" ls $dest_path done