add --use-iam flag to backup

This commit is contained in:
Jordan Sitkin
2017-05-01 16:31:54 -07:00
parent 3038d575c8
commit 0a9d80e344
3 changed files with 17 additions and 8 deletions

View File

@@ -7,12 +7,12 @@ source "$(dirname "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)")/functions"
postgres-backup-cmd() {
declare desc="creates a backup of the $PLUGIN_SERVICE service to an existing s3 bucket"
local cmd="$PLUGIN_COMMAND_PREFIX:backup" argv=("$@"); [[ ${argv[0]} == "$cmd" ]] && shift 1
declare SERVICE="$1" BUCKET_NAME="$2"
declare SERVICE="$1" BUCKET_NAME="$2" S3_FLAG="$3"
[[ -z "$SERVICE" ]] && dokku_log_fail "Please specify a name for the service"
[[ -z "$BUCKET_NAME" ]] && dokku_log_fail "Please specify an aws bucket for the backup"
verify_service_name "$SERVICE"
service_backup "$SERVICE" "$BUCKET_NAME"
service_backup "$SERVICE" "$BUCKET_NAME" "$S3_FLAG"
}
postgres-backup-cmd "$@"