Skip to content

Push santitized DB to Google Drive #154

Open

Activity

  1. modified the milestones: v1, v1.2 on Aug 7, 2018
  2. self-assigned this
    on Aug 7, 2018
  3. modified the milestones: v1.2, v1.3 on Sep 19, 2018
  4. modified the milestones: v1.3, v1.4 on Feb 14, 2019
  5. modified the milestones: 8.x-1.4, 8.x-1.5 on Apr 2, 2019
  6. modified the milestones: 8.x-1.5, on May 15, 2019
  7. removed this from the milestone on Aug 19, 2019
  8. added this to the 1.17 milestone on Jul 16, 2022
  9. 25 remaining items

  10. added this to the 1.43.0 milestone on Nov 9, 2026
  11. AlexSkrypnyk commented on Nov 11, 2026

    @AlexSkrypnyk
    MemberAuthor

    Postponed

    We tried Google Drive as a place to push the sanitized database to, and fetch it back from, in PR #3306. It works, but the setup is too heavy for what it's meant to be, so it's parked here and the PR now pushes to FTP and S3 instead. Here's what we learned, so whoever picks this up doesn't start from zero.

    What was built

    The full implementation lives in the history of PR #3306, at commit afd4b02:

    • vortex-fetch-db-gdrive: signs a JWT (RS256) for a Google Cloud service account with php -r and openssl_sign, swaps it for an OAuth access token, finds the dump by name in a folder (files.list with supportsAllDrives=true) and downloads it with alt=media. It supports VORTEX_DB_INDEX.
    • vortex-push-db-gdrive: same sign-in. It uploads through a resumable session in a single PUT, so dumps aren't capped by the 5 MB multipart limit, and replaces a same-named file in place (PATCH), so the file ID and sharing stay put.
    • BATS suites that sign a real JWT with a key generated per test, plus try-fetch-db-gdrive.sh and try-push-db-gdrive.sh playground scripts.

    Why it's parked

    There's no way to reach the Drive API without credentials, and Google only issues those through a Cloud project. Each sign-in option has a catch:

    • Service account key (what was built): service accounts have no storage of their own, so they can only create files in a shared drive. That needs Google Workspace, and on organisations created since May 2024 the iam.disableServiceAccountKeyCreation policy blocks key creation until an admin overrides it. Workspace also treats *.iam.gserviceaccount.com addresses as external, so the shared drive has to allow outside members.
    • OAuth refresh token of a dedicated account: this works with a plain shared folder in that account's My Drive, with no Workspace and no shared drive. It still needs a free personal Cloud project, an OAuth client and a one-time consent, for example through the OAuth Playground. The app has to be In production, because "Testing" mode expires refresh tokens after 7 days. Anyone holding the token has full access to that account's Drive.
    • Email and password: not possible. Google has switched off password sign-in for third-party apps, and App Passwords don't cover Drive.

    Other things to watch for:

    • A free account's 15 GB fills up fast once old copies are kept.
    • On GitHub Actions the JSON key secret has to be single-line (jq -c . key.json), because the workflow copies env into $GITHUB_ENV line by line.

    If we pick it up again

    The least friction is probably the OAuth refresh token of a dedicated account, with the folder shared as Viewer to a read-only service account for developers' fetches. Service accounts can read from a normal shared folder. A similar option is Google Cloud Storage through its S3-compatible API, which would only need an endpoint variable on the S3 scripts. It also needs a Cloud project, though.

  12. removed this from the 1.43.0 milestone on Nov 11, 2026
  13. added 6 commits that reference this issue on Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    IdeaIdea that requires additional discussion

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions