https://github.com/alikhachev/ha-backup-s3-uploader
A simple tool to upload Home Assistant backups to S3
https://github.com/alikhachev/ha-backup-s3-uploader
Last synced: 24 days ago
JSON representation
A simple tool to upload Home Assistant backups to S3
- Host: GitHub
- URL: https://github.com/alikhachev/ha-backup-s3-uploader
- Owner: ALikhachev
- License: mit
- Created: 2024-12-29T23:23:14.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-30T01:59:38.000Z (over 1 year ago)
- Last Synced: 2025-02-23T01:34:06.560Z (over 1 year ago)
- Language: Rust
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Home Assistant Backup S3 Uploader [](https://hub.docker.com/r/alexlikhachev/ha-backup-s3-uploader) 
A simple tool for uploading Home Assistant backups to S3 or S3-compatible storage (like Minio). Built as an experiment
to explore the Rust ecosystem!
## Features
* Works with S3 or S3-compatible storage such as Minio.
* Uploads backups with their actual names, e.g., replacing `99733641.tar` with `test-backup.tar` (if that was the
original name of the backup).
## How to use
1. Get your storage credentials and configure permissions.
2. Run the Docker image `alexlikhachev/ha-backup-s3-uploader`, mounting the Home Assistant backups directory to
`/backups`, as follows:
```shell
docker run --rm \
-e AWS_ACCESS_KEY_ID='' \
-e AWS_SECRET_ACCESS_KEY='' \
-e AWS_SESSION_TOKEN='[session-token]' \
-e AWS_REGION='' \
-e AWS_ENDPOINT='[custom-endpoint]' \
-e AWS_BUCKET='' \
-v :/backups \
alexlikhachev/ha-backup-s3-uploader:latest
```
The `` could be something like `/usr/share/hassio/backup`.
3. The application will upload any existing backups and terminate once completed.
4. To upload backups regularly, configure it via crontab.
## TODO
* Better integration with Home Assistant.
* Improved error handling.
* ...
## How to build (tested only on macOS so far)
1. Install the Rust toolchain: [Install Rust](https://www.rust-lang.org/tools/install).
2. Install Cross for cross-compilation:
```bash
cargo install cross
```
3. Build the project using the provided script:
```bash
./build.sh
```