Skip to content
This repository was archived by the owner on Aug 29, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 54 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,60 @@
# 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.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
An alternative way to upload snapshots that does not involve Google Drive or Dropbox.
Home Assistant addon to upload your home automation backups (formally snapshots) to Nextcloud, Owncloud, or S3.


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)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- WebDAV (i.e. Nextcloud)
- WebDAV (e.g. Nextcloud or Owncloud)

- 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: <access key>
aws_secret_access_key: <secret access key>
bucket: <bucket name>
```

## 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: <ADDON_NAME> # 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/<ADDON_NAME>/logs
```

## Future plans

Add more sink types and add error handling and notifications

Expand All @@ -30,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.
SOFTWARE.
29 changes: 29 additions & 0 deletions Snap-Shipper/DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.<region-code>.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: <ADDON_NAME> # 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/<ADDON_NAME>/logs
```

## License

MIT License
Expand Down
60 changes: 56 additions & 4 deletions Snap-Shipper/README.md
Original file line number Diff line number Diff line change
@@ -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: <access key>
aws_secret_access_key: <secret access key>
bucket: <bucket name>
```

## 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: <ADDON_NAME> # 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/<ADDON_NAME>/logs
```

## Future plans

Add more sink types and add error handling and notifications

## License

Expand All @@ -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.
SOFTWARE.