diff --git a/.gitignore b/.gitignore index 360f7b9..c332a22 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,10 @@ __pycache__/ *.py[cod] *$py.class +modules.xml +PostgresBackup.iml +profiles_settings.xml +vcs.xml # C extensions *.so diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/backup.sh b/backup.sh index b675b6b..a37f3ae 100644 --- a/backup.sh +++ b/backup.sh @@ -124,6 +124,7 @@ function upload_postgres_backup_to_s3() { local SECRET_KEY="" local BUCKET_NAME="" local ENDPOINT_URL="" + local BUCKET_KEEP_PREVIOUS_BACKUPS="" ACCESS_KEY="${!access_keys[i]}" SECRET_KEY="${!secret_keys[i]}" @@ -145,7 +146,7 @@ function upload_postgres_backup_to_s3() { echo "[INFO] Uploading backup to S3 bucket $((i+1)) ..." local backup_name="" - if [[ "$BUCKET_KEEP_PREVIOUS_BACKUPS" == "true" ]]; then + if [ "$BUCKET_KEEP_PREVIOUS_BACKUPS" ]; then backup_name="backup_$NOW.sql" else backup_name="backup.sql"