# Google Drive Binding \[5.0.0;6.0.0.0)

**URL:** <https://community.openhab.org/t/google-drive-binding-5-0-0-6-0-0-0/170779>\
**Category:** Bundles\
**Tags:** binding, beta, published\
**Created:** [October 26, 2026, 12:21am UTC](https://community.openhab.org/t/google-drive-binding-5-0-0-6-0-0-0/170779 "2026-10-26T00:21:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pierrecity](https://community.openhab.org/user_avatar/community.openhab.org/pierrecity/32/65299_2.png) [@pierrecity](https://community.openhab.org/u/pierrecity)\
**Post date:** [October 26, 2026, 12:21am UTC](https://community.openhab.org/t/google-drive-binding-5-0-0-6-0-0-0/170779/1 "2026-10-26T00:21:05Z")

</div>

![Google_drive_logo](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/a/f/af2213751f8bee4c4c4ecaec114bdc174f7fd0b2.png)

> 🧪 **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!

* * *

> **[GitHub - pierrecinema/openhab-binding-googledrive: openHAB 5 binding: automatically upload openHAB...](https://github.com/pierrecinema/openhab-binding-googledrive)**
>
> openHAB 5 binding: automatically upload openHAB backups to Google Drive (beta)

# 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**.

![Account bridge](https://raw.githubusercontent.com/pierrecinema/openhab-binding-googledrive/main/docs/images/account-bridge.png)

 ![image](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/5/c/5ce20b744bcabbb2e171eaaca645ea725da5939b.png)

## Features

- **Easy login** with a device code on [Anmelden – Google Konten](http://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 |
| --- | --- |
| ![Backup configuration](https://raw.githubusercontent.com/pierrecinema/openhab-binding-googledrive/main/docs/images/backup-thing-configuration.png) | ![Backup channels](https://raw.githubusercontent.com/pierrecinema/openhab-binding-googledrive/main/docs/images/backup-thing-channels.png) |

![Storage quota](https://raw.githubusercontent.com/pierrecinema/openhab-binding-googledrive/main/docs/images/account-bridge-channels.png)

## 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

1. Download the JAR (see Resources below)
2. Copy it into the `addons` folder:
  - Docker: `/openhab/addons`
  - openHABian / apt / rpm: `/usr/share/openhab/addons`

3. Set up the Google Cloud project as described in the [README](https://github.com/pierrecinema/openhab-binding-googledrive#google-cloud-setup)
4. Add the **Google Drive Account** bridge, enter client ID and secret, then enter the shown code on [Anmelden – Google Konten](http://google.com/device)
5. 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.4.0 – safer backup detection**

- Completed-archive check: before every upload (automatic and manual) the ZIP file is opened and every entry is read and checked against its CRC
- Half-written or damaged archives are not uploaded; the binding keeps waiting and warns after 10 minutes if a backup stays incomplete
- Incomplete archives can no longer affect the retention cleanup in Google Drive
- Tested with a real 294 MB backup: checked and uploaded in about 11 seconds

**0.3.0 – keep N backups on the server**

- New setting _Backups to Keep on Server_: only the newest N backups stay in `userdata/backup`
- Safety rule: a local backup is only deleted if it is in Google Drive or older than the newest backup in Google Drive – a backup that could not be uploaded yet is never deleted
- New dashboard widget (MainUI card) with status, last upload, backups in Drive, storage bar and “Upload now” button – YAML in the repo and attached to every release

**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:[https://github.com/pierrecinema/openhab-binding-googledrive/releases/download/v0.4.1/org.openhab.binding.googledrive-0.4.1.jar](https://github.com/pierrecinema/openhab-binding-googledrive/releases/download/v0.4.1/org.openhab.binding.googledrive-0.4.1.jar)
- All releases: [Releases · pierrecinema/openhab-binding-googledrive · GitHub](https://github.com/pierrecinema/openhab-binding-googledrive/releases)
- Source code & documentation: [GitHub - pierrecinema/openhab-binding-googledrive: openHAB 5 binding: automatically upload openHAB backups to Google Drive (beta) · GitHub](https://github.com/pierrecinema/openhab-binding-googledrive)
- Issues: [Issues · pierrecinema/openhab-binding-googledrive · GitHub](https://github.com/pierrecinema/openhab-binding-googledrive/issues)
- License: EPL-2.0

---

<div class="post-metadata">

**Author:** ![pierrecity](https://community.openhab.org/user_avatar/community.openhab.org/pierrecity/32/65299_2.png) [@pierrecity](https://community.openhab.org/u/pierrecity)\
**Post date:** [November 4, 2026, 6:44pm UTC](https://community.openhab.org/t/google-drive-binding-5-0-0-6-0-0-0/170779/4 "2026-11-04T18:44:33Z")

</div>

add at marketplace
