pass appid to backup script
This commit is contained in:
@@ -12,21 +12,22 @@ if [[ $# == 1 && "$1" == "--check" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ $# -lt 7 ]; then
|
||||
echo "Usage: backupapp.sh <s3 config url> <s3 data url> <access key id> <access key> <session token> <region> <password>"
|
||||
if [ $# -lt 8 ]; then
|
||||
echo "Usage: backupapp.sh <appid> <s3 config url> <s3 data url> <access key id> <access key> <session token> <region> <password>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
readonly DATA_DIR="${HOME}/data"
|
||||
|
||||
# env vars used by the awscli
|
||||
s3_config_url="$1"
|
||||
s3_data_url="$2"
|
||||
export AWS_ACCESS_KEY_ID="$3"
|
||||
export AWS_SECRET_ACCESS_KEY="$4"
|
||||
export AWS_SESSION_TOKEN="$5"
|
||||
export AWS_DEFAULT_REGION="$6"
|
||||
password="$7"
|
||||
readonly app_id="$1"
|
||||
readonly s3_config_url="$2"
|
||||
readonly s3_data_url="$3"
|
||||
export AWS_ACCESS_KEY_ID="$4"
|
||||
export AWS_SECRET_ACCESS_KEY="$5"
|
||||
export AWS_SESSION_TOKEN="$6"
|
||||
export AWS_DEFAULT_REGION="$7"
|
||||
readonly password="$8"
|
||||
|
||||
readonly now=$(date "+%Y-%m-%dT%H:%M:%S")
|
||||
readonly app_data_dir="${DATA_DIR}/${app_id}"
|
||||
|
||||
Reference in New Issue
Block a user