Skip to content

Commit

Permalink
Make sure all keyspaces are restored, if not error out
Browse files Browse the repository at this point in the history
so that the user is aware of the issue.

Change-Id: I366ffd56d85ea6c31bb2eef6bdb163b6a409bf84
Closes-bug: 1610486
  • Loading branch information
cijohnson committed Aug 6, 2016
1 parent e0d11d1 commit e1b0a11
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/config/utils/cass-db-restore.sh
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e1b0a11

Please sign in to comment.