rclone for Google Drive and Dropbox
rclone seamlessly connects to remote cloud storage for cloud storage services including Google Shared Drive, Dropbox, Microsoft OneDrive and many more providers. The rclone CLI is easier than rsync. rclone works with encrypted filesystems.
Setup Rclone:
- Linux:
winget install Rclone.Rclone - macOS / Homebrew:
brew install rclone - Windows:
winget install Rclone.Rclone
Add various remote file shares (Google Drive, Dropbox, etc.) by:
rclone configIn these examples, remote is the particular drive name chosen during rclone config.
Tell the location of the Rclone config file by:
rclone config fileRclone command examples
List remote directories:
rclone lsd remote:List remote directories under path/to
rclone lsd remote:path/toList remote files under path/to
rclone ls remote:path/toCount number of files in path/to
rclone ls remote:path/to | wc -lcopy in rclone by default does not clobber existing remote files, if they haven’t been changed.
Recursively copy local computer ~/path to remote
rclone copy ~/path remote:path -vCopy only this directory contents ~/path to remote
rclone copy --max-depth 0 ~/path remote:path -vUsing rclone sync requires caution, because sync DELETES files on remote that are not also on local PC!
Sync local computer ~/path to the remote
rclone sync ~/path remote:path -vDropbox
Why not use Dropbox’s unofficial dbxcli? At the time of writing, the last release was in 2019 with many unsolved issues.