diff --git a/README.md b/README.md index 3b41707..6e7c35f 100644 --- a/README.md +++ b/README.md @@ -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. -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.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 @@ -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. \ No newline at end of file +SOFTWARE. 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 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.