rclone Guide
What is rclone?
rclone is a command-line program for managing files on cloud storage. It supports over 70 cloud storage providers, including S3-compatible services like BHK Cloud. With rclone you can mount your BHK Cloud storage as a local drive, sync directories, or copy files between providers.
Installation
Install rclone on your platform:
brew install rclone
curl https://rclone.org/install.sh | sudo bash
winget install Rclone.Rclone
Verify the installation with rclone version.
Configuration
Run the interactive configuration to add BHK Cloud as a remote:
rclone config
Follow the prompts:
- Select n for new remote
- Name it
bhkcloud - Select s3 as the storage type
- Choose Other as the S3 provider
- Enter your BHK Cloud API key as the access_key_id
- Enter your secret key as the secret_access_key
- Set the endpoint to
s3.bhkcloud.com - Leave other options as defaults
Or add it manually to your rclone config file:
[bhkcloud]
type = s3
provider = Other
access_key_id = YOUR_ACCESS_KEY
secret_access_key = YOUR_SECRET_KEY
endpoint = s3.bhkcloud.com
Mounting as a Drive
Mount your BHK Cloud storage as a local directory:
rclone mount bhkcloud: ~/bhkcloud --vfs-cache-mode full
On Windows, mount to a drive letter:
rclone mount bhkcloud: B: --vfs-cache-mode full
The --vfs-cache-mode full flag enables read-write caching for the best experience with applications that need random file access.
Syncing Files
Sync a local folder to BHK Cloud:
rclone sync /path/to/local/folder bhkcloud:my-bucket/backup
rclone sync bhkcloud:my-bucket/backup /path/to/local/folder
Use rclone copy instead of rclone sync to avoid deleting files in the destination that are not in the source.
Common Commands
| Command | Description |
|---|---|
rclone ls bhkcloud: |
List all files with sizes |
rclone lsd bhkcloud: |
List directories only |
rclone copy file.txt bhkcloud:bucket/ |
Upload a single file |
rclone delete bhkcloud:bucket/old-file.txt |
Delete a remote file |
rclone size bhkcloud: |
Show total storage used |
rclone check local/ bhkcloud:bucket/ |
Compare local and remote files |
For more commands and options, see the official rclone documentation.