Skip to content

[Documentation] OpenDAL Google Drive backend broken - recommend rclone instead #1619

@mro68

Description

@mro68

Title: [Documentation] OpenDAL Google Drive backend broken - recommend rclone instead


Problem

The OpenDAL backend for Google Drive currently has a critical bug that returns size=0 for all files during list() operations, even though the files are not empty. This causes massive downstream errors:

$ rustic check -P gdrive_backup_od
[ERROR] pack 003a836a:  size computed by index:  76969720, actual size: 0
[ERROR] pack 008b374d: size computed by index: 77415589, actual size: 0
... 

The repository & index are correct – OpenDAL simply returns wrong metadata.

Upstream Issue

This bug has been reported to the OpenDAL project:

  • apache/opendal - Issue about missing size field in Google Drive list operations
  • The OpenDAL bot (Dosu) confirmed the analysis and referenced PR #6683

Workaround

Use rclone backend instead of OpenDAL for Google Drive:

# ❌ DON'T USE (broken):
[repository]
repository = "opendal: gdrive"

# ✅ USE THIS INSTEAD:
[repository]
repository = "rclone:GDrive:/BKP"

Performance Comparison

Beyond the metadata bug, OpenDAL also has severe performance issues:

Operation rclone OpenDAL
rustic check ~5s >10 minutes
Pack listing ~2s >15s (timeout)
API efficiency optimized 2,293 List calls/s (!)
API calls total ~2-3 List calls ~2,300+ List calls

Google Cloud Console metrics show:

  • DriveFiles.List: 2,293 requests/second (!)
  • Expected: 2-3 requests total for 1,572 files

Recommendation

Until the OpenDAL bug is fixed upstream:

  1. ✅ Use rclone backend for Google Drive
  2. ⚠️ Consider OpenDAL for other backends (e.g., S3, Azure) where it works properly

Documentation Update Needed

The rustic documentation should clarify:

  • OpenDAL Google Drive support is experimental and currently broken
  • rclone is the recommended backend for Google Drive
  • Link to the upstream OpenDAL issue

Tested Configuration

# Working configuration with rclone:
[repository]
repository = "rclone:GDrive:/BKP"
password-file = "/path/to/password"

# rclone. conf with OAuth2:
[GDrive]
type = drive
scope = drive
token = {"access_token":"... ","token_type":"Bearer",...}

Test repository size:

  • 1,592 files (1,572 packs + 17 index + 2 snapshots + 1 key)
    1. 0 GiB compressed
  • 158.7 GiB original data

Related Issues


Note: I'm not a Rust developer! This analysis was done with help from friends and AI tools.
Questions welcome in German – my English is rather weak, so German responses are very welcome! 🙂

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-triageStatus: Waiting for a maintainer to triage this issue/PR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions