Skip to content

Commit

Permalink
fix: shellcheck rules [SC1091] [SC2162]
Browse files Browse the repository at this point in the history
  • Loading branch information
askonev committed Mar 15, 2024
1 parent 513f271 commit c1d91d6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
15 changes: 0 additions & 15 deletions lib/survey.sh

This file was deleted.

25 changes: 20 additions & 5 deletions restore_backup.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,32 @@
#!/bin/bash

echo 'The script restores the default state of the \
public schema, which will delete all data'

source lib/survey.sh

# Correctly configure aws cli before running this script
# `aws configure`

CPU_COUNT=4
DB_CONTAINER_ID=$(docker-compose ps -q db)
BACKUP_NAME="${BACKUP_NAME:-unknown-backup}"


echo 'The script restores the default state of the' \
'public schema, which will delete all data'

while true; do

echo "Continue? (yes/no) "
read -r yn

case $yn in
yes ) echo 'start of dump recovery';
break;;
no ) echo 'exiting...';
exit 1;;
* ) echo 'invalid response';;
esac

done


# download dump
aws s3 cp s3://palladium-backup/"$BACKUP_NAME" .

Expand Down

0 comments on commit c1d91d6

Please sign in to comment.