The dropbox backend (backend-dropbox) implements Dropbox API v2 with token_access_type=offline PKCE loopback auth, strict 4 MiB upload-session geometry matching Dropbox's content hash tree, and native files/copy_v2 server-side copy.
Dropbox App Console Setup#
- Open the Dropbox App Console and click Create app.
- Choose Scoped access, then pick Full Dropbox (access entire account) or App folder (isolated folder), give the app a unique name, and create it.
- Under the app's Permissions tab, enable the required scopes and click Submit:
account_info.read(required byrship about)files.metadata.read&files.metadata.writefiles.content.read&files.content.write
- Under Settings -> OAuth 2 -> Redirect URIs, note that
rship auth dropboxbinds an ephemeral loopback callbackhttp://127.0.0.1:<port>/callback(token_access_type=offlinewith PKCE). Add your redirect URI if required by your app policy, and copy the App key (--client-id). - Migrating from rclone? Skip app setup and import existing credentials directly with
rship config import-rclone.
Setup#
# Desktop OAuth2 PKCE login with offline refresh token
rship auth dropbox dbx \
--client-id "<DROPBOX_APP_KEY>" \
--root-path /backups
# Optional: lock refresh token in OS Keyring
rship auth keyring-migrate
rship about dbx:Flags Reference (rship auth dropbox)#
| Flag | Default | Description |
|---|---|---|
<REMOTE> | — | Logical remote name (e.g. dropbox, work-dbx) |
--client-id | Interactive prompt | Dropbox App Key from the Dropbox App Console |
--client-secret | None | Optional App Secret (omit for pure public Desktop PKCE apps) |
--root-path | / | Root folder path inside Dropbox (e.g. /backups) |
--access-token | None | Direct bearer token for non-interactive CI / testing |
Protocol Internals#
- 4 MiB block-aligned sessions: Files
<= 4 MiBupload via/files/upload. Larger files useupload_session/start+append_v2+finishwith48 MiBdefault chunks (12 × 4 MiB, below Dropbox's148 MiBsafe session limit). Every non-final chunk stays strictly aligned to4 MiB. incorrect_offsetcrash-resume recovery: If an upload session restarts with an offset mismatch after a crash or network drop,rshipreconciles the server's reportedcorrect_offsetdirectly and resumes from exact block boundaries without duplicating data.- Native
dropbox_content_hash: Computes Dropbox's 4 MiB-block SHA-256 tree natively sorship checkand dedupe verify bit-exact integrity without re-downloading files. - Server-side copy & batch delete: Uses
files/copy_v2for fast remote copies and batcheddelete_batchcalls duringrship sync/delete.