AWS S3 for backups

Hi there,

I would love to see the possibility to use AWS S3 for backups. Depending on the type of S3 tier, you can get reasonable cheap prices (e.g. Deep Archive) and the backup amount is not that big anyway. Using the backup encryption option we have anyway already in home assistant, this is a safe way to store backups off-site.

As there is already an AWS integration, I don’t need to write, that there already are quite good Python libraries to access S3.

Best,

Tobias

The next release contains an AWS S3 integration for backups.

As of now it seems to only accept Amazon S3 buckets, though, and none of the (way cheaper) alternatives out there (e.g. backblaze), which is a pity.

1 Like

It used to work for non-AWS backups as I had it working until i updated to b7. Not sure why it’d be removed and now I have to sort out my backups again

2 Likes

Yes, the change linked above was added recently.
I left a comment in the respective commit; the change itself was suggested by frenck. There is no reason given in the pull request, but this might give a hint: Revert "Disable S3 checksums" (#144092) by edenhaus · Pull Request #144318 · home-assistant/core · GitHub

It all seems to be connected with the changes introduced in boto3 recently: S3 on Backblaze: Unsupported header 'x-amz-sdk-checksum-algorithm' received for this API call · Issue #143995 · home-assistant/core · GitHub

Seems we are out of luck and might need to fall back to hacs again…

1 Like

That’s not true, someone needs to develop a backup specifically for Boto3 as an integration. They are all using different versions of S3, so the decision was made to only support AWS S3 for the first integration. Anyone is welcome to add the other integrations into core.

Mhm makes sense! It’s a pity S3 is not really an open standard.

1 Like

Since you seem to have been part of the conversation: the idea is to create an integration per S3-provider? The only difference between e.g Amazon & Backblaze (+ Hetzner) as of now would be setting the checksum calculation to ‘when_required’.
So if I were to open an MR with such an integration it would be accepted, despite the code duplication?

This is a great add-on. Thank you so much for providing it. :heart::heart::heart:

Maybe just one feature request: could we add a folder name (or “prefix” as it is named in AWS terms)? Or can I just add the prefix to the bucket name?

Awesome addon - would love to see MinIO support for the “full selfhosted experience” :smiley:

2 Likes

The code wouldn’t be identical because issues arose with other s3 services, which is why the checksum was added in the first place

Thanks for clearing this up!

Is there a current existing HACS integration? I searched but didn’t find anything yet.