Address PR comments.
This commit is contained in:
parent
6dbb07abcb
commit
6a59245264
|
@ -1,11 +1,16 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Take the current datetime:
|
# Get current working directory (pwd doesn't cut it)
|
||||||
DT=`date +%Y-%m-%d`
|
cwd=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
|
||||||
# Set the environment:
|
# Set the environment:
|
||||||
set -o allexport
|
set -o allexport
|
||||||
source ../.env
|
source $cwd/../.env
|
||||||
set +o allexport
|
set +o allexport
|
||||||
|
# Check for AWS credentials:
|
||||||
|
if [[ $AWS_ACCESS_KEY_ID == "" || $AWS_SECRET_ACCESS_KEY == "" ]]; then
|
||||||
|
echo "Missing AWS credentials!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
# Take the current datetime:
|
# Take the current datetime:
|
||||||
DT=`date +%Y-%m-%d`
|
DT=`date +%Y-%m-%d`
|
||||||
# Create the backup:
|
# Create the backup:
|
||||||
|
|
|
@ -6,10 +6,17 @@ if [[ $BACKUP == "" ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Get current working directory (pwd doesn't cut it)
|
||||||
|
cwd=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
|
||||||
# Set the environment:
|
# Set the environment:
|
||||||
set -o allexport
|
set -o allexport
|
||||||
source ../.env
|
source $cwd/../.env
|
||||||
set +o allexport
|
set +o allexport
|
||||||
|
# Check for AWS credentials:
|
||||||
|
if [[ $AWS_ACCESS_KEY_ID == "" || $AWS_SECRET_ACCESS_KEY == "" ]]; then
|
||||||
|
echo "Missing AWS credentials!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
# Restore the backup:
|
# Restore the backup:
|
||||||
docker exec cockroach \
|
docker exec cockroach \
|
||||||
cockroach sql \
|
cockroach sql \
|
||||||
|
|
Reference in New Issue