Skip to content

Commit

Permalink
allas-backup fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Kimmo Mattila committed Jun 5, 2024
1 parent 5e2ee80 commit 5ccbdbc
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions allas-backup
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,7 @@ if [[ $mode == "swift" ]]; then
fi

### Settings in case of S3
if [[ $mode == "s3cmd" ]]; then
echo "S3 mode inn use"
if [[ $mode == "s3cmd" ]]; then
if [[ -e $HOME/.aws/credentials ]]; then
export AWS_DEFAULT_REGION=""
export $(grep AWS_ACCESS_KEY_ID $HOME/.aws/credentials)
Expand All @@ -211,6 +210,12 @@ if [[ $mode == "s3cmd" ]]; then
echo "Unable to find S3 credentials for Allas."
exit 1
fi
if [[ -z "${OS_PROJECT_NAME}" ]]; then
echo "Allas project not defined!"
echo "Please set environment variable: OS_PROJECT_NAME"
echo "to define the Allas project"
exit 1
fi
bucket_name="${project_label}-s3backup"
repository="s3:a3s.fi/${bucket_name}"
fi
Expand Down

0 comments on commit 5ccbdbc

Please sign in to comment.