Skip to content

Commit

Permalink
Create backup_and_process_tableConfig.sh
Browse files Browse the repository at this point in the history
this breaks up the file so it can be submitted into a new cluster
  • Loading branch information
Keith committed Mar 21, 2023
1 parent ead3088 commit 3977ec2
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions examples/backup_and_process_tableConfig.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
mkdir -p backups
for i in `startree table listTables | jq -r '.tables | .[]'`
do
echo | startree table getConfig --tableName $i | jq '.' > $i.json


if [ `jq -r .realtime.tableType $i.json` = "REALTIME" ]
then echo | jq '.realtime' $i.json > $i.tableconfig.json
else echo | jq '.offline' $i.json > $i.tableconfig.json
fi

echo | jq '.schema' $i.json > $i.schema.json

mv $i.json backups
mv $i.*.json backups

printf "$i backup created \n"
done
printf "All backups created \n"

0 comments on commit 3977ec2

Please sign in to comment.