feat: Add a --use-iam flag to backup subcommand

This commit is contained in:
Jose Diaz-Gonzalez
2017-08-26 04:23:24 -04:00
parent cff35dd8bf
commit f1d1a9d945
3 changed files with 20 additions and 12 deletions

View File

@@ -7,12 +7,12 @@ source "$(dirname "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)")/functions"
redis-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"
}
redis-backup-cmd "$@"