Skip to content

feat(drive): add one-way recursive directory push #925

Description

@Avg8888

Problem

gog drive upload --replace can update one known Drive file ID, but safely backing up a local directory still requires every caller to implement recursive traversal, folder creation, duplicate-name detection, checksum comparison, and ID-stable updates.

Using a Google Drive for Desktop mount as the destination is not an equivalent solution: cloud-only File Provider placeholders do not behave like ordinary readable files and can break filesystem tools when they compare or replace evicted destination files.

Proposed scope

Add a one-way command:

gog drive sync push <local-directory> --parent <folder-id>

Semantics:

  • recursively reproduce the local directory hierarchy under an existing Drive folder;
  • create missing folders and binary files;
  • skip unchanged files using Drive md5Checksum and size;
  • update changed binary files by Drive file ID;
  • retain remote-only files (no delete or mirror mode);
  • reject local symlinks;
  • fail before mutation when a remote sibling name is ambiguous or has the wrong type;
  • support deterministic --dry-run, --json, and plain output;
  • preserve existing shared-drive support through supportsAllDrives.

Non-goals

  • bidirectional synchronization;
  • pull;
  • remote deletion;
  • persistent sync state;
  • Google-native file round-tripping;
  • durable upload-session resumption across process restarts.

Prior art

This intentionally narrows the Drive sync portion of #116. That PR combined pull, push, delete, include/exclude rules, and persistent state; maintainers requested a separate design and live-proof path for those semantics.

Existing primitives remain useful:

This proposal does not duplicate either command; it adds bounded recursive reconciliation for local-directory backup workflows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions