Skip to content

Commit

Permalink
Merge pull request #7 from dral3x/sync-backups-s3/debug-mode
Browse files Browse the repository at this point in the history
Sync Backups on S3: Debug mode
  • Loading branch information
dral3x authored Feb 26, 2024
2 parents 72d4131 + b3d0f82 commit 3b8d64e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
8 changes: 6 additions & 2 deletions sync-backups-s3/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# Changelog

## 1.0.3

- Add `debug_mode` option to get more logs during execution

## 1.0.2

- Add `endpoint_url` option to support non-AWS S3-compatible services
- Add `endpoint_url` option to support non-AWS S3-compatible services

## 1.0.1

- Remove unneccesary option `aws_region`

## 1.0.0

- Initial release
- Initial release
8 changes: 5 additions & 3 deletions sync-backups-s3/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Sync Backups on Amazon S3",
"version": "1.0.2",
"version": "1.0.3",
"slug": "sync-backups-on-s3",
"description": "Sync backups to your Amazon S3 bucket",
"url": "https://github.com/dral3x/ha-addons/tree/main/sync-backups-s3",
Expand All @@ -17,7 +17,8 @@
"bucket_folder": "/",
"delete_if_missing": false,
"storage_class": "STANDARD_IA",
"endpoint_url": ""
"endpoint_url": "",
"debug_mode": false
},
"schema": {
"aws_key_id": "password",
Expand All @@ -26,7 +27,8 @@
"bucket_folder": "str",
"delete_if_missing": "bool",
"storage_class": "list(STANDARD|REDUCED_REDUNDANCY|STANDARD_IA|ONEZONE_IA|INTELLIGENT_TIERING|GLACIER|DEEP_ARCHIVE|GLACIER_IR)",
"endpoint_url": "str?"
"endpoint_url": "str?",
"debug_mode": "bool"
},
"map": ["backup:rw"]
}
4 changes: 4 additions & 0 deletions sync-backups-s3/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ FOLDER=`jq -r .bucket_folder /data/options.json`
STORAGE_CLASS=`jq -r .storage_class /data/options.json`
DELETE=`jq -r .delete_if_missing /data/options.json`
ENDPOINT_URL=`jq -r .endpoint_url /data/options.json`
DEBUG=`jq -r .debug_mode /data/options.json`

# Setting up aws cli
aws configure set aws_access_key_id $KEY
Expand All @@ -27,6 +28,9 @@ fi
if [[ -n "$ENDPOINT_URL" ]]; then
OPTIONS+=" --endpoint-url $ENDPOINT_URL"
fi
if [[ $DEBUG == true ]]; then
OPTIONS+=" --debug"
fi

echo "Sync started..."

Expand Down
3 changes: 3 additions & 0 deletions sync-backups-s3/translations/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ configuration:
endpoint_url:
name: S3-compatible API endpoint URL
description: Leave it empty if you want to use AWS S3 service. Otherwise set it to the endpoint that others S3-compatible services offers (for example DigitalOcean, Backblaze, Wasabi or Cloudflare). Be aware that the URL should start with "https://"
debug_mode:
name: Debug mode
description: Enable this option if you want to get more details in the logs of the execution of this add-on.

0 comments on commit 3b8d64e

Please sign in to comment.