From 5d26c13f5eec921a1fea7ed81d3f4708ab7b9f0d Mon Sep 17 00:00:00 2001 From: Grayson Adams <51373669+GraysonCAdams@users.noreply.github.com> Date: Thu, 4 Feb 2021 15:59:25 -0500 Subject: [PATCH 1/4] Update README.md More details on usage / automating --- README.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 52 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3b41707..c487374 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,58 @@ # Snap-Shipper -This is a simple script to help you Ship those snapshots +An alternative way to upload snapshots that does not involve Google Drive or Dropbox. -This was made because i wanted a solution for automatically uploading my snapshots that didn't involve google drive or dropbox and as such this works right now, but if there is interest i would gladly try to make this more suitable for a wider audience. +**Supports** +- WebDAV (i.e. Nextcloud) +- Amazon S3 Bucket -## future plans +## Configuration example + +``` +DryRun: true +Folder: /backup +Sinks: + - Name: Your Webdav + WebDavClient: + webdav_hostname: 'https://Your-domæne/remote.php/dav/files/some-user/backups' + webdav_login: some-user + webdav_password: the password + - Name: AWS S3 + S3Client: + endpoint_url: 'https://s3.eu-west-1.amazonaws.com' + aws_access_key: + aws_secret_access_key: + bucket: +``` + +## Running at an interval + +You can run this add-on at an interval using Home Assistant automations. Here's an example: + +**Backup snapshots every day at midnight** +``` +alias: Backup snapshots +description: '' +trigger: + - platform: time + at: '00:00:00' +condition: [] +action: + - service: hassio.addon_start + data: + addon: # to find name, view README.md +mode: single +``` + +### Finding the `addon` value for an automation + +When editing the add-on's configuration or viewing its logs, observe the URL slug and you can find the add-on name: + +``` +https://your.hassio.domain:8123/hassio/addon//logs +``` + +## Future plans Add more sink types and add error handling and notifications @@ -30,4 +78,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. From b16154e4fa8236e56db3163e38d418c3df61c066 Mon Sep 17 00:00:00 2001 From: Grayson Adams <51373669+GraysonCAdams@users.noreply.github.com> Date: Thu, 4 Feb 2021 16:12:15 -0500 Subject: [PATCH 2/4] Update README.md Include snapshot example --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index c487374..6e7c35f 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,8 @@ trigger: at: '00:00:00' condition: [] action: + - service: hassio.snapshot_full + data: {} - service: hassio.addon_start data: addon: # to find name, view README.md From 9e8b192435a5f86d0d51470f17c41be3fe7cac4b Mon Sep 17 00:00:00 2001 From: Grayson Adams <51373669+GraysonCAdams@users.noreply.github.com> Date: Wed, 10 Feb 2021 00:59:17 -0500 Subject: [PATCH 3/4] Update README.md --- Snap-Shipper/README.md | 60 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 56 insertions(+), 4 deletions(-) diff --git a/Snap-Shipper/README.md b/Snap-Shipper/README.md index 60d058a..6e7c35f 100644 --- a/Snap-Shipper/README.md +++ b/Snap-Shipper/README.md @@ -1,10 +1,62 @@ # Snap-Shipper -this is a simple script to help you Ship those snapshots +An alternative way to upload snapshots that does not involve Google Drive or Dropbox. -Running this add on will upload any file in the supplied path that is not already present in the destination. +**Supports** +- WebDAV (i.e. Nextcloud) +- Amazon S3 Bucket -This was made because i wanted a solution for automatically uploading my snapshots that didn't involve google drive or dropbox and as such this works right now, but if there is interest i would gladly try to make this more suitable for a wider audience. +## Configuration example + +``` +DryRun: true +Folder: /backup +Sinks: + - Name: Your Webdav + WebDavClient: + webdav_hostname: 'https://Your-domæne/remote.php/dav/files/some-user/backups' + webdav_login: some-user + webdav_password: the password + - Name: AWS S3 + S3Client: + endpoint_url: 'https://s3.eu-west-1.amazonaws.com' + aws_access_key: + aws_secret_access_key: + bucket: +``` + +## Running at an interval + +You can run this add-on at an interval using Home Assistant automations. Here's an example: + +**Backup snapshots every day at midnight** +``` +alias: Backup snapshots +description: '' +trigger: + - platform: time + at: '00:00:00' +condition: [] +action: + - service: hassio.snapshot_full + data: {} + - service: hassio.addon_start + data: + addon: # to find name, view README.md +mode: single +``` + +### Finding the `addon` value for an automation + +When editing the add-on's configuration or viewing its logs, observe the URL slug and you can find the add-on name: + +``` +https://your.hassio.domain:8123/hassio/addon//logs +``` + +## Future plans + +Add more sink types and add error handling and notifications ## License @@ -28,4 +80,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. From 65884601dac0585f37e29ae30aac4cd8de8697c9 Mon Sep 17 00:00:00 2001 From: Grayson Adams <51373669+GraysonCAdams@users.noreply.github.com> Date: Wed, 10 Feb 2021 00:59:57 -0500 Subject: [PATCH 4/4] Update DOCS.md --- Snap-Shipper/DOCS.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/Snap-Shipper/DOCS.md b/Snap-Shipper/DOCS.md index b72d11e..75a4588 100644 --- a/Snap-Shipper/DOCS.md +++ b/Snap-Shipper/DOCS.md @@ -52,6 +52,35 @@ The S3 client can upload snapshots to any S3 compatible storage (e.g. AWS S3, Ba - **endpoint_url**: The URL of the storage provider. For AWS S3, this follows the schema `https://s3..amazonaws.com`, see [AWS docs](https://docs.aws.amazon.com/general/latest/gr/rande.html) +## Running at an interval + +You can run this add-on at an interval using Home Assistant automations. Here's an example: + +**Backup snapshots every day at midnight** +``` +alias: Backup snapshots +description: '' +trigger: + - platform: time + at: '00:00:00' +condition: [] +action: + - service: hassio.snapshot_full + data: {} + - service: hassio.addon_start + data: + addon: # to find name, view README.md +mode: single +``` + +### Finding the `addon` value for an automation + +When editing the add-on's configuration or viewing its logs, observe the URL slug and you can find the add-on name: + +``` +https://your.hassio.domain:8123/hassio/addon//logs +``` + ## License MIT License