Adds parameters to backup-auth for region support and non AWS endpoint support

Refs dokku/dokku-mariadb#61
This commit is contained in:
Jose Diaz-Gonzalez
2017-08-26 00:07:22 -04:00
parent ae495c4761
commit bd8d86c69b
4 changed files with 56 additions and 16 deletions

View File

@@ -18,7 +18,7 @@ sudo dokku plugin:install https://github.com/dokku/dokku-redis.git redis
```
redis:backup <name> <bucket> Create a backup of the redis service to an existing s3 bucket
redis:backup-auth <name> <aws_access_key_id> <aws_secret_access_key> Sets up authentication for backups on the redis service
redis:backup-auth <name> <aws_access_key_id> <aws_secret_access_key> (<aws_default_region>) (<aws_signature_version>) (<endpoint_url>) Sets up authentication for backups on the redis service
redis:backup-deauth <name> Removes backup authentication for the redis service
redis:backup-schedule <name> <schedule> <bucket> Schedules a backup of the redis service
redis:backup-unschedule <name> Unschedules the backup of the redis service
@@ -179,9 +179,7 @@ OR
## Backups
Datastore backups are supported via AWS S3. The only supported region is `us-east-1`, and using an S3 bucket in another region will result in an error.
> If you would like to sponsor work to enable support for other regions, please contact [@josegonzalez](http://github.com/josegonzalez/).
Datastore backups are supported via AWS S3 and S3 compatible services like [minio](https://github.com/minio/minio).
Backups can be performed using the backup commands:
@@ -202,3 +200,16 @@ dokku redis:backup-schedule lolipop CRON_SCHEDULE BUCKET_NAME
# remove the scheduled backup from cron
dokku redis:backup-unschedule lolipop
```
Backup auth can also be set up for different regions, signature versions and endpoints (e.g. for minio):
```
# setup s3 backup authentication with different region
dokku redis:backup-auth lolipop AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_REGION
# setup s3 backup authentication with different signature version and endpoint
dokku redis:backup-auth lolipop AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_REGION AWS_SIGNATURE_VERSION ENDPOINT_URL
# more specific example for minio auth
dokku redis:backup-auth lolipop MINIO_ACCESS_KEY_ID MINIO_SECRET_ACCESS_KEY us-east-1 s3v4 https://YOURMINIOSERVICE
```