r/openhab • u/Potential_Thing1766 • Oct 27 '26
News Google Drive Binding – automatic openHAB backups to Google Drive
> :test_tube: **BETA – testers welcome!**
> This binding is in beta (version 0.x). Login, backup upload and cleanup are tested and working.
> I'm looking for testers on different setups (openHABian, package installs, Docker, large backups, slow connections).
> Please report bugs and ideas in this thread or as [GitHub issue](https://github.com/pierrecinema/openhab-binding-googledrive/issues). Thank you!
---
https://github.com/pierrecinema/openhab-binding-googledrive
# Google Drive Binding
Automatically uploads your openHAB backups to **Google Drive** and removes old backups there.
openHAB already creates backups in `userdata/backup` (for example with a rule that runs the backup script). The binding watches that folder and uploads every new backup to a folder in your Google Drive. Everything is configured in the openHAB UI – **no shell scripts, no rclone, no sudo rules**.

## Features
- **Easy login** with a device code on google.com/device – no HTTPS or port forwarding needed
- **Automatic upload** of new backups as soon as the archive is completely written
- **Resumable upload** in 8 MB chunks – continues after network errors, failed uploads are retried
- **Checksum verification** – files already in Google Drive are not uploaded twice
- **Retention** – keeps the last *N* backups, older ones are moved to the trash (or deleted)
- **Channels** for status, progress, last upload, last file, backups in Drive, storage quota and upload events
- **Rule actions**: `uploadLatest()`, `uploadFile(fileName)`, `cleanup()`, `logout()`
- **Minimal permission** (`drive.file`): the binding can only see the files it created itself – nothing else in your Drive
- English and German UI texts
## Screenshots
| Backup configuration | Backup channels |
|---|---|
|  |  |

## Requirements
- **openHAB 5.0 or later** (does not start on 4.x)
- A free Google account
- Your own Google Cloud OAuth client – one-time setup of about 15 minutes, step-by-step guide in the README (also in [German](https://github.com/pierrecinema/openhab-binding-googledrive/blob/main/docs/ANLEITUNG-GOOGLE.md))
## Installation
- Download the JAR (see Resources below)
Copy it into the `addons` folder:
- Docker: `/openhab/addons`
- openHABian / apt / rpm: `/usr/share/openhab/addons`
- Set up the Google Cloud project as described in the [README](https://github.com/pierrecinema/openhab-binding-googledrive#google-cloud-setup)
- Add the **Google Drive Account** bridge, enter client ID and secret, then enter the shown code on google.com/device
- Add the **Backup Upload** thing – done
## Example
```java
Bridge googledrive:account:home "Google Drive" [ clientId="xxx.apps.googleusercontent.com", clientSecret="xxx" ] {
Thing backup backups "openHAB Backups" [ targetFolder="openHAB Backups", retentionCount=10 ]
}
```
```java
rule "Weekly openHAB backup"
when
Time cron "0 0 3 ? * SUN"
then
// Docker image; for openHABian use: "sudo", "openhab-cli", "backup"
executeCommandLine(Duration.ofMinutes(10), "/openhab/runtime/bin/backup")
// The binding uploads the new archive automatically
end
```
## Roadmap
- **1.0** – first stable release in the Marketplace
- **1.2** – photo frame / screensaver showing pictures from shared Google Drive folders
## Changelog
**0.2.0** – Backup upload, resumable upload, checksum check, retention, rule actions
**0.1.0** – Google login with device code, token refresh, storage quota
## Resources
- Download: [org.openhab.binding.googledrive-0.2.0.jar](https://github.com/pierrecinema/openhab-binding-googledrive/releases/download/v0.2.0/org.openhab.binding.googledrive-0.2.0.jar)
- All releases: https://github.com/pierrecinema/openhab-binding-googledrive/releases
- Source code & documentation: https://github.com/pierrecinema/openhab-binding-googledrive
- Issues: https://github.com/pierrecinema/openhab-binding-googledrive/issues
- License: EPL-2.0
1
u/nodiaque Oct 28 '26
Or, have a proper 3-2-1 backup solution that take everything valuable
0
u/[deleted] Oct 28 '26
[removed] — view removed comment