supaS3docs

08 / 12

Bidirectional Sync & Scheduled Jobs

Synchronize folders between local disk and cloud buckets in either direction, inspect dry-run diffs, and run capability-hardened scheduled jobs.

supaS3 supports one-way synchronization in both directions—Local → Cloud (upload sync) and Cloud → Local (download sync)—either interactively from the Sync to other side… toolbar button or as recurring/manual Scheduled Jobs.

Non-Destructive Sync Semantics

  • Never deletes destination-only files: Neither Local → Cloud nor Cloud → Local ever deletes files or objects that exist only on the destination side.
  • Single-use comparison plan: Every interactive sync starts with a full comparison preview showing New, Changed (will replace), Unchanged, and Destination-only (left alone) counts plus total bytes. Replacements require explicit confirmation, and each comparison snapshot can only be executed once.
  • Glob filters: Filter both directions with comma-separated relative Include and Exclude globs (* for single path segment, ** for any depth; exclusions always win).

Capability-Based Local Folder Hardening

Local folders approved for synchronization are protected against TOCTOU directory swaps and symlink attacks:

  • Pinned FolderIdentity: Approval binds the folder's OS identity (dev/ino on Unix, volume/file-index via GetFileInformationByHandle on Windows).
  • O_NOFOLLOW / Reparse-Point Rejection: Scanning, hashing, temporary .part cleanup, and atomic file commits operate strictly relative to verified non-symlink directory handles (O_DIRECTORY | O_NOFOLLOW on Unix, FILE_FLAG_OPEN_REPARSE_POINT checks on Windows).
  • Adversarial Remote Key Rejection (Cloud → Local): Every remote object key is validated before download against .. traversal, control characters, Windows reserved device names (including superscript variants like COM¹, LPT², NUL), Unicode NFC/NFD normalization collisions, and case-folding collisions.

Fast O(1) Rescans (sync-state.json)

For multipart objects, SSE-KMS buckets (where ETags are not plain MD5 hashes), and Cloud → Local mirrors, supaS3 maintains a private 0600 sync-state.json index bound to:

  • Connection profile & bucket/prefix
  • Verified FolderIdentity & normalized relative path
  • Remote ETag, version_id, full-file SHA-256, and post-commit local FileIdentity

Subsequent sync comparisons identify unchanged files in O(1) without re-hashing gigabytes of local data.

Scheduled Sync Jobs & Anti-Starvation Gate

Open Scheduled jobs… in the bottom-left sidebar to manage automated upload or download syncs:

  • Triggers: Run on a fixed interval or keep manual-only one-click jobs.
  • Fail-closed unattended downloads: During unattended scheduled Cloud → Local runs, objects that are Archived (GLACIER / DEEP_ARCHIVE not yet restored) or Unverified (pre-existing local files with no prior sync record when replacement is off) are skipped safely and reported in the job run summary rather than stalling or overwriting blindly.
  • FolderSyncGate: Opposite-direction sync jobs targeting the same local directory are serialized through an anti-starvation gate so concurrent upload and download runs never race on the same files, without blocking unrelated global transfer slots.

Last updated

On this page