Rclone: Expert Guide for Cloud Synchronization on Linux VPS
What is Rclone?
Rclone is an open-source command-line tool for managing files on over 70 cloud storage services. Often called "rsync for the cloud", it offers advanced features for synchronization, transfer, encryption, and mounting of remote file systems.
Internal Architecture
┌─────────────────────────────────────────────────────────┐
│ Rclone Core │
│ (Operations Engine) │
├─────────────────────────────────────────────────────────┤
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ VFS │ │ Crypt │ │ Chunker │ │
│ │ Layer │ │ Layer │ │ Layer │ │
│ │ (Mount │ │ (Client- │ │ (Split │ │
│ │ Cache) │ │ Side) │ │ Files) │ │
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ │
│ │ │ │ │
│ └───────────────┴───────────────┘ │
│ │ │
│ ┌────────▼────────┐ │
│ │ Backend │ │
│ │ Abstraction │ │
│ └────────┬────────┘ │
└───────────────────────┼────────────────────────────────┘
│
┌───────────────┼───────────────┐
│ │ │
┌───▼───┐ ┌───▼───┐ ┌───▼───┐
│ S3/R2 │ │GDrive │ │ SFTP │
│ B2 │ │OneDrv │ │WebDAV │
└───────┘ └───────┘ └───────┘
Main Capabilities
┌──────────────────────────────────────────────┐
│ Rclone Features │
├──────────────────────────────────────────────┤
│ ✅ Bidirectional synchronization │
│ ✅ Client-side encryption │
│ ✅ FUSE mounting (as local disk) │
│ ✅ Server-side transfers (no download) │
│ ✅ Version management │
│ ✅ Deduplication │
│ ✅ Advanced filtering (regex, glob) │
│ ✅ Bandwidth limiting │
│ ✅ Automatic resume │
│ ✅ Integrity verification (checksum) │
└──────────────────────────────────────────────┘
System Requirements
| Component | Minimum | Recommended | VeryCloud |
|---|---|---|---|
| RAM | 512 MB | 2 GB+ | VPS NVMe 4GB |
| CPU | 1 vCPU | 2+ vCPU | VPS Ryzen |
| Storage | 100 MB | 1 GB (cache) | SSD/NVMe |
| Kernel | 3.10+ | 5.4+ (FUSE3) | Ubuntu 24.04 |
| OS | Ubuntu 18.04+ | Ubuntu 22.04/24.04 | ✅ Supported |
Advanced Installation
Method 1: Official Script (Recommended)
One-line installation:
curl -fsSL https://rclone.org/install.sh | sudo bash
Verification:
rclone version
Expected output:
rclone v1.68.2
- os/version: ubuntu 24.04 (64 bit)
- os/kernel: 6.8.0-51-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.23.4
Method 2: Manual Installation (Full Control)
Advantages:
- Precise version choice
- Signature verification
- Installation without root (optional)
# Define desired version
RCLONE_VERSION="v1.68.2"
ARCH="amd64" # or arm64 for ARM
# Download
cd /tmp
curl -LO "https://downloads.rclone.org/${RCLONE_VERSION}/rclone-${RCLONE_VERSION}-linux-${ARCH}.zip"
# Extract
unzip rclone-${RCLONE_VERSION}-linux-${ARCH}.zip
cd rclone-${RCLONE_VERSION}-linux-${ARCH}
# Install binary
sudo cp rclone /usr/local/bin/
sudo chmod 755 /usr/local/bin/rclone
# Install man pages
sudo mkdir -p /usr/local/share/man/man1
sudo cp rclone.1 /usr/local/share/man/man1/
sudo mandb
# Bash autocompletion
rclone completion bash | sudo tee /etc/bash_completion.d/rclone > /dev/null
# Zsh autocompletion
rclone completion zsh | sudo tee /usr/local/share/zsh/site-functions/_rclone > /dev/null
# Cleanup
cd /tmp
rm -rf rclone-${RCLONE_VERSION}-linux-${ARCH}*
Method 3: Build from Source
For advanced users:
# Install Go 1.21+
sudo apt update
sudo apt install -y golang-go git
# Clone
git clone https://github.com/rclone/rclone.git
cd rclone
# Optimized build
go build -ldflags "-s -w" -o rclone
# Install
sudo mv rclone /usr/local/bin/
sudo chmod +x /usr/local/bin/rclone
FUSE Installation (Mounting)
Required for rclone mount:
# Ubuntu/Debian
sudo apt update
sudo apt install -y fuse3 libfuse3-dev
# Enable FUSE for non-root users
sudo sed -i 's/#user_allow_other/user_allow_other/' /etc/fuse.conf
# Verification
cat /etc/fuse.conf | grep user_allow_other
Expected output:
user_allow_other
Multi-Provider Configuration
Configuration File Structure
Location: ~/.config/rclone/rclone.conf
Format: INI with sections per remote
[remote-name]
type = storage_type
option1 = value1
option2 = value2
Google Drive Configuration
Interactive Method
rclone config
# Interactive menu:
# n) New remote
# Name: gdrive
# Storage: drive (Google Drive)
# client_id: (leave empty or use your own OAuth)
# client_secret: (leave empty or use your own OAuth)
# scope: drive
# service_account_file: (leave empty)
# Edit advanced config: n
# Use auto config: y (if browser available)
Headless Configuration (VPS without GUI)
On your local PC:
rclone authorize "drive"
Copy generated token, then on VPS:
rclone config
# n) New remote
# Name: gdrive
# Storage: drive
# ... (other options)
# Use auto config: n
# Paste obtained token
Complete Configuration Example
[gdrive]
type = drive
client_id = YOUR_CLIENT_ID.apps.googleusercontent.com
client_secret = YOUR_CLIENT_SECRET
scope = drive
token = {"access_token":"ya29.xxx","token_type":"Bearer","refresh_token":"1//xxx","expiry":"2026-01-31T10:00:00Z"}
team_drive =
root_folder_id =
Amazon S3 Configuration
rclone config
# Name: s3-aws
# Storage: s3 (Amazon S3)
# Provider: AWS
# Get AWS credentials from runtime: n
# access_key_id: AKIAIOSFODNN7EXAMPLE
# secret_access_key: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
# region: eu-west-1
# endpoint: (leave empty for AWS)
# acl: private
# storage_class: STANDARD_IA
Resulting file:
[s3-aws]
type = s3
provider = AWS
access_key_id = AKIAIOSFODNN7EXAMPLE
secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
region = eu-west-1
acl = private
storage_class = STANDARD_IA
Cloudflare R2 Configuration
[s3-r2]
type = s3
provider = Cloudflare
access_key_id = YOUR_R2_ACCESS_KEY
secret_access_key = YOUR_R2_SECRET_KEY
endpoint = https://YOUR_ACCOUNT_ID.r2.cloudflarestorage.com
acl = private
no_check_bucket = true
Backblaze B2 Configuration
rclone config
# Name: b2
# Storage: b2 (Backblaze B2)
# account: YOUR_APPLICATION_KEY_ID
# key: YOUR_APPLICATION_KEY
# hard_delete: true (permanent deletion)
Resulting file:
[b2]
type = b2
account = YOUR_APPLICATION_KEY_ID
key = YOUR_APPLICATION_KEY
hard_delete = true
SFTP Configuration
[sftp-backup]
type = sftp
host = backup.verycloud.fr
user = backupuser
port = 22
key_file = ~/.ssh/backup_key
shell_type = unix
md5sum_command = md5sum
sha1sum_command = sha1sum
Service Account Configuration (Google Workspace)
For automation without interaction:
- Create directory:
mkdir -p ~/.config/rclone/sa
- Place JSON file:
# Download from Google Cloud Console
# Place in: ~/.config/rclone/sa/service-account.json
- Configure Rclone:
[gdrive-sa]
type = drive
scope = drive
service_account_file = /home/user/.config/rclone/sa/service-account.json
team_drive = 0ABCdefGHIjklMNOpqr
Configuration Verification
# List configured remotes
rclone listremotes
# Test connection
rclone lsd gdrive:
# Show remote configuration
rclone config show gdrive
Fundamental Commands
General Syntax
rclone [options] subcommand <source> [<destination>] [flags]
Operations diagram:
┌──────────────┐ ┌──────────────┐
│ Source │ │ Destination │
│ │ │ │
│ /local/ │ ──── rclone ────► │ remote: │
│ remote1: │ sync/copy │ /local/ │
│ │ │ remote2: │
└──────────────┘ └──────────────┘
Listing and Navigation
# List configured remotes
rclone listremotes
# List content (size only)
rclone ls gdrive:
rclone ls gdrive:Documents/
# Detailed listing (size + date)
rclone lsl gdrive:
# List directories only
rclone lsd gdrive:
# Complete tree
rclone tree gdrive:Projects/ --level 3
# JSON format (for scripting)
rclone lsjson gdrive: --recursive
# Search files
rclone ls gdrive: --include "*.pdf" --recursive
rclone ls gdrive: --include "backup-*.tar.gz"
Example output:
1024 file1.txt
2048 folder/file2.pdf
1048576 archive.zip
File Copy
Copy diagram:
Copy (copy)
───────────
Source : A, B, C
Destination : A, B, C, D
↓
Result : A, B, C, D (D preserved)
# Copy local → remote
rclone copy /local/path gdrive:backup/ -P
# Copy remote → local
rclone copy gdrive:Documents/ /local/documents/ -P
# Copy between two remotes (server-side if supported)
rclone copy gdrive:source/ s3-aws:destination/ -P
# Copy single file
rclone copyto /local/file.txt gdrive:backup/file.txt
# Copy with bandwidth limit
rclone copy /data/ gdrive:backup/ --bwlimit 10M -P
File Move
Move diagram:
Move (move)
───────────
Source : A, B, C → (empty)
Destination : D → A, B, C, D
# Move (copy + delete source)
rclone move /local/temp/ gdrive:archive/ -P
# Move with verification
rclone move /old/data/ gdrive:new/ --check-first -P
Synchronization
⚠️ WARNING: sync deletes files in destination not present in source!
Sync diagram:
Sync (sync)
───────────
Source : A, B, C
Destination : A, B, D
↓
Result : A, B, C (D deleted!)
# Unidirectional sync (source → destination)
rclone sync /local/data/ gdrive:data/ -P
# ALWAYS do a dry-run first!
rclone sync /local/data/ gdrive:data/ --dry-run
# Bidirectional sync (EXPERIMENTAL)
rclone bisync /local/data/ gdrive:data/ --resync
Deletion
# Delete specific file
rclone deletefile gdrive:path/to/file.txt
# Delete directory and contents
rclone purge gdrive:old-backup/
# Delete files only (keep folders)
rclone delete gdrive:temp/
# Delete empty folders
rclone rmdirs gdrive: --leave-root
# Delete files older than 30 days
rclone delete gdrive:logs/ --min-age 30d
Essential Flags
| Flag | Description | Example |
|---|---|---|
-P, --progress | Show progress | rclone copy ... -P |
-v, --verbose | Verbose mode | rclone copy ... -v |
-n, --dry-run | Simulation without changes | rclone sync ... --dry-run |
--transfers N | Parallel transfers | --transfers 8 |
--checkers N | Parallel checkers | --checkers 16 |
--bwlimit RATE | Bandwidth limit | --bwlimit 10M |
--exclude PATTERN | Exclude files | --exclude "*.tmp" |
--include PATTERN | Include only | --include "*.pdf" |
--min-size SIZE | Minimum size | --min-size 1M |
--max-size SIZE | Maximum size | --max-size 100M |
--min-age DURATION | Minimum age | --min-age 7d |
--max-age DURATION | Maximum age | --max-age 30d |
Advanced Filtering
Filter Patterns
Syntax:
+ pattern # Include
- pattern # Exclude
Example filter file:
cat > /etc/rclone/filters.txt << 'EOF'
# Inclusions (processed first)
+ **.pdf
+ **.docx
+ **.xlsx
+ Documents/**
+ Photos/**/*.jpg
# Exclusions
- *.tmp
- *.log
- *.cache
- .git/**
- node_modules/**
- __pycache__/**
- .DS_Store
- Thumbs.db
- desktop.ini
# Exclude files > 1GB
- **/*
+ **/*{0..1073741824}
EOF
Usage:
rclone sync /data/ gdrive:backup/ \
--filter-from /etc/rclone/filters.txt \
-P
Command-Line Filters
# Include only PDFs
rclone copy /docs/ gdrive:backup/ --include "*.pdf"
# Exclude temporary files
rclone sync /data/ gdrive:backup/ --exclude "*.tmp" --exclude "*.log"
# Multiple filters
rclone copy /photos/ gdrive:backup/ \
--include "*.jpg" \
--include "*.png" \
--exclude "*thumbnail*" \
--min-size 100K \
--max-size 50M
Date Filtering
# Copy files modified in last 7 days
rclone copy /data/ gdrive:backup/ --max-age 7d -P
# Archive files older than 90 days
rclone move /data/ gdrive:archive/ --min-age 90d -P
# Delete files older than one year
rclone delete gdrive:logs/ --min-age 365d
FUSE Mounting and Cache
FUSE Mount Concept
┌──────────────────────────────────────────────┐
│ Linux Applications │
│ (ls, cp, vim, plex, etc.) │
└──────────────┬───────────────────────────────┘
│
│ System calls (open, read, write)
│
┌──────────────▼───────────────────────────────┐
│ Rclone FUSE │
│ (Mount + VFS Cache) │
└──────────────┬───────────────────────────────┘
│
│ API Calls (HTTP/S)
│
┌──────────────▼───────────────────────────────┐
│ Cloud Storage │
│ (Google Drive, S3, B2, etc.) │
└──────────────────────────────────────────────┘
Basic Mount
# Create mount point
sudo mkdir -p /mnt/gdrive
sudo chown $USER:$USER /mnt/gdrive
# Simple mount
rclone mount gdrive: /mnt/gdrive --daemon
# Verification
ls /mnt/gdrive/
df -h | grep gdrive
Mount with Advanced Options
rclone mount gdrive: /mnt/gdrive \
--daemon \
--allow-other \
--vfs-cache-mode full \
--vfs-cache-max-size 10G \
--vfs-cache-max-age 24h \
--vfs-read-chunk-size 64M \
--vfs-read-chunk-size-limit 1G \
--buffer-size 256M \
--dir-cache-time 72h \
--poll-interval 15s \
--log-file /var/log/rclone/gdrive.log \
--log-level INFO
VFS Cache Modes
Mode comparison:
| Mode | Read | Write | Usage | Performance |
|---|---|---|---|---|
off | Streaming | Direct | Videos, streaming | Low, economical |
minimal | Streaming | Cache | File upload | Medium |
writes | Streaming | Cache until upload | Occasional editing | Good |
full | Full cache | Full cache | Intensive usage, apps | Excellent |
Mode diagram:
Mode OFF
────────
App → FUSE → Cloud (direct, no cache)
Mode MINIMAL
────────────
App → FUSE → Cache (write) → Cloud
App → FUSE → Cloud (direct read)
Mode WRITES
───────────
App → FUSE → Cache → Cloud (after close)
App → FUSE → Cloud (direct read)
Mode FULL
─────────
App → FUSE → Local cache ⇄ Cloud
(read and write in cache, auto sync)
Systemd Service (Persistent Mount)
Create dedicated user:
sudo useradd -r -s /usr/sbin/nologin rclone
sudo mkdir -p /var/log/rclone /var/cache/rclone
sudo chown rclone:rclone /var/log/rclone /var/cache/rclone
Create service:
sudo tee /etc/systemd/system/rclone-gdrive.service << 'EOF'
[Unit]
Description=Rclone Mount - Google Drive
Documentation=https://rclone.org/docs/
After=network-online.target
Wants=network-online.target
[Service]
Type=notify
User=rclone
Group=rclone
ExecStartPre=/bin/mkdir -p /mnt/gdrive
ExecStart=/usr/local/bin/rclone mount gdrive: /mnt/gdrive \
--config /home/rclone/.config/rclone/rclone.conf \
--allow-other \
--vfs-cache-mode full \
--vfs-cache-max-size 20G \
--vfs-cache-max-age 72h \
--vfs-read-chunk-size 32M \
--vfs-read-chunk-size-limit 256M \
--buffer-size 128M \
--dir-cache-time 48h \
--poll-interval 30s \
--log-level INFO \
--log-file /var/log/rclone/gdrive.log \
--cache-dir /var/cache/rclone/gdrive
ExecStop=/bin/fusermount -uz /mnt/gdrive
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF
Enable service:
sudo systemctl daemon-reload
sudo systemctl enable rclone-gdrive.service
sudo systemctl start rclone-gdrive.service
# Check status
sudo systemctl status rclone-gdrive.service
Unmounting
# Clean unmount
fusermount -u /mnt/gdrive
# Force unmount (if stuck)
fusermount -uz /mnt/gdrive
# Via systemd
sudo systemctl stop rclone-gdrive.service
Encryption and Security
Encryption Architecture
┌──────────────────────────────────────────────┐
│ Original File │
│ document.pdf │
└──────────────┬───────────────────────────────┘
│
│ Client Encryption
│ (AES-256 / Salsa20)
▼
┌──────────────────────────────────────────────┐
│ Encrypted File + Obfuscated Name │
│ q4kp2q8fj3m2nxyz1234567890abcdef │
└──────────────┬───────────────────────────────┘
│
│ Upload
▼
┌──────────────────────────────────────────────┐
│ Cloud Storage │
│ (file unreadable by provider) │
└──────────────────────────────────────────────┘
Encrypted Remote Configuration
rclone config
# Interactive menu:
# n) New remote
# Name: gdrive-crypt
# Storage: crypt
# remote: gdrive:encrypted/ (underlying remote + folder)
# filename_encryption: standard
# directory_name_encryption: true
# password: (generate strong password)
# password2: (generate salt, recommended)
Resulting file:
[gdrive-crypt]
type = crypt
remote = gdrive:encrypted/
password = ENCRYPTED_PASSWORD_HASH
password2 = ENCRYPTED_SALT_HASH
filename_encryption = standard
directory_name_encryption = true
Name Encryption Modes
| Mode | Filenames | Directory names | Example |
|---|---|---|---|
off | Clear | Clear | document.pdf |
standard | Encrypted | Encrypted | q4kp2q8fj3m2nxyz... |
obfuscate | Obfuscated | Obfuscated | yqkpzqFfj3m2nxyz... |
Transparent Usage
# Operations are identical
rclone copy /sensitive/data/ gdrive-crypt: -P
# Cloud side (via unencrypted remote)
rclone ls gdrive:encrypted/
# Output: q4kp2q8fj3m2... (unreadable)
# Via encrypted remote
rclone ls gdrive-crypt:
# Output: document.pdf (readable)
Secure Configuration
Encrypt configuration file:
rclone config password
# Enter master password
# rclone.conf file will be encrypted
Use via environment variable:
export RCLONE_CONFIG_PASS="your_strong_password"
# Or from secret file
export RCLONE_CONFIG_PASS=$(cat /run/secrets/rclone_pass)
Configuration via Environment Variables
Avoid config file:
# Google Drive
export RCLONE_CONFIG_GDRIVE_TYPE=drive
export RCLONE_CONFIG_GDRIVE_TOKEN='{"access_token":"..."}'
# S3
export RCLONE_CONFIG_S3_TYPE=s3
export RCLONE_CONFIG_S3_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
export RCLONE_CONFIG_S3_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG
# Remotes now available without config file
rclone ls gdrive:
rclone ls s3:bucket/
Automation and Scripting
Complete Backup Script
File: /usr/local/bin/rclone-backup.sh
#!/usr/bin/env bash
#
# rclone-backup.sh - VeryCloud Automated Backup Script
# Usage: ./rclone-backup.sh [daily|weekly|monthly]
#
set -euo pipefail
# Configuration
readonly SCRIPT_NAME=$(basename "$0")
readonly LOG_DIR="/var/log/rclone"
readonly LOG_FILE="${LOG_DIR}/backup-$(date +%Y%m%d-%H%M%S).log"
readonly LOCK_FILE="/var/run/rclone-backup.lock"
# Parameters
readonly LOCAL_SOURCE="/var/www"
readonly REMOTE_DEST="gdrive-crypt:backups"
readonly RETENTION_DAYS=30
readonly BANDWIDTH_LIMIT="50M"
readonly MAX_TRANSFERS=4
# Colors
readonly GREEN='\033[0;32m'
readonly RED='\033[0;31m'
readonly NC='\033[0m'
# Functions
log() {
local level="$1"
shift
local timestamp=$(date '+%Y-%m-%d %H:%M:%S')
echo "${timestamp} [${level}] $*" | tee -a "${LOG_FILE}"
}
cleanup() {
rm -f "${LOCK_FILE}"
log "INFO" "Lock released"
}
acquire_lock() {
exec 200>"${LOCK_FILE}"
if ! flock -n 200; then
log "ERROR" "Another instance running"
exit 1
fi
}
perform_backup() {
local backup_type="${1:-daily}"
local timestamp=$(date +%Y%m%d-%H%M%S)
local dest_path="${REMOTE_DEST}/${backup_type}/${timestamp}"
log "INFO" "Starting ${backup_type} backup"
rclone sync "${LOCAL_SOURCE}" "${dest_path}" \
--transfers "${MAX_TRANSFERS}" \
--checkers 8 \
--bwlimit "${BANDWIDTH_LIMIT}" \
--log-file "${LOG_FILE}" \
--log-level INFO \
--stats 1m \
--exclude "*.tmp" \
--exclude "*.log" \
--exclude "cache/**" \
--retries 3 \
--retries-sleep 10s \
-P
local exit_code=$?
if [ $exit_code -eq 0 ]; then
log "INFO" "${GREEN}Backup ${backup_type} OK${NC}"
else
log "ERROR" "${RED}Backup ${backup_type} FAIL (code: ${exit_code})${NC}"
fi
return $exit_code
}
cleanup_old_backups() {
log "INFO" "Cleaning backups > ${RETENTION_DAYS} days"
rclone delete "${REMOTE_DEST}" \
--min-age "${RETENTION_DAYS}d" \
--rmdirs \
--log-file "${LOG_FILE}"
log "INFO" "Cleanup completed"
}
main() {
local backup_type="${1:-daily}"
mkdir -p "${LOG_DIR}"
trap cleanup EXIT
log "INFO" "=== Starting ${SCRIPT_NAME} (${backup_type}) ==="
acquire_lock
if perform_backup "${backup_type}"; then
cleanup_old_backups
else
exit 1
fi
log "INFO" "=== End ${SCRIPT_NAME} ==="
}
main "$@"
Make executable:
sudo chmod +x /usr/local/bin/rclone-backup.sh
Cron Configuration
# Edit crontab
crontab -e
# Automated backups
# Daily at 2am
0 2 * * * /usr/local/bin/rclone-backup.sh daily >> /var/log/rclone/cron.log 2>&1
# Weekly on Sunday at 3am
0 3 * * 0 /usr/local/bin/rclone-backup.sh weekly >> /var/log/rclone/cron.log 2>&1
# Monthly on 1st at 4am
0 4 1 * * /usr/local/bin/rclone-backup.sh monthly >> /var/log/rclone/cron.log 2>&1
# Cache cleanup daily at 5am
0 5 * * * rclone cleanup gdrive: --config ~/.config/rclone/rclone.conf
Systemd Timer (Cron Alternative)
Service:
sudo tee /etc/systemd/system/rclone-backup.service << 'EOF'
[Unit]
Description=Rclone Backup Service
After=network-online.target
[Service]
Type=oneshot
User=root
ExecStart=/usr/local/bin/rclone-backup.sh daily
StandardOutput=journal
StandardError=journal
EOF
Timer:
sudo tee /etc/systemd/system/rclone-backup.timer << 'EOF'
[Unit]
Description=Run Rclone Backup Daily
[Timer]*-*-* 02:00:00
RandomizedDelaySec=300
Persistent=true
[Install]
WantedBy=timers.target
EOF
Enable:
sudo systemctl daemon-reload
sudo systemctl enable --now rclone-backup.timer
# Check
systemctl list-timers | grep rclone
Performance Optimization
Transfer Tuning
High performance configuration:
rclone sync /source/ remote:dest/ \
--transfers 16 \
--checkers 32 \
--buffer-size 512M \
--drive-chunk-size 256M \
--fast-list \
--tpslimit 10 \
--tpslimit-burst 20 \
-P
Provider-Specific Parameters
Google Drive
rclone copy /data/ gdrive:backup/ \
--drive-chunk-size 256M \
--drive-upload-cutoff 256M \
--drive-acknowledge-abuse \
--drive-keep-revision-forever=false \
--fast-list \
-P
Amazon S3 / Cloudflare R2
rclone copy /data/ s3:bucket/path/ \
--s3-chunk-size 100M \
--s3-upload-cutoff 200M \
--s3-upload-concurrency 8 \
--s3-copy-cutoff 4G \
--fast-list \
-P
Backblaze B2
rclone copy /data/ b2:bucket/path/ \
--b2-chunk-size 96M \
--b2-upload-cutoff 200M \
--b2-hard-delete \
--fast-list \
-P
Bandwidth Management
# Fixed limit
--bwlimit 10M
# Variable limit by time
--bwlimit "08:00,512K 18:00,10M 23:00,off"
# Separate upload/download limit
--bwlimit "10M:5M" # 10M up, 5M down
Variable limit diagram:
Bandwidth (MB/s)
10 ┤ ┌─────────────┐
│ │ │
5 ┤ │ │
│ │ │
0.5 ┤───────────┘ └─────────
└───────────────────────────────────> Hour
0h 8h 18h 23h 24h
Benchmarking
# Full speed test
rclone test speed remote: --transfers 10
# Memory benchmark
rclone test memory remote:path/
# Measure bandwidth
rclone test bandwidth remote:path/ --time 30s
# Test large file
time rclone copy /test/1GB.bin remote:test/ -P --stats 1s
Monitoring and Logging
Log Configuration
Log levels:
--log-level DEBUG # Very verbose (debug)
--log-level INFO # Standard (recommended)
--log-level NOTICE # Important only
--log-level ERROR # Errors only
File output:
rclone copy /data/ remote:backup/ \
--log-file /var/log/rclone/operation.log \
--log-level INFO
JSON format (for parsing):
--use-json-log
Detailed Statistics
rclone sync /source/ remote:dest/ \
--stats 30s \
--stats-file-name-length 0 \
--stats-log-level NOTICE \
--stats-one-line \
-P
Logrotate
sudo tee /etc/logrotate.d/rclone << 'EOF'
/var/log/rclone/*.log {
daily
missingok
rotate 14
compress
delaycompress
notifempty
create 0640 rclone rclone
sharedscripts
}
EOF
Expert Troubleshooting
Common Issues
Error 403 - Rate Limit (Google Drive)
Symptom:
ERROR : Failed to copy: googleapi: Error 403: User Rate Limit Exceeded
Solutions:
# 1. Reduce parallelism
--transfers 2 --checkers 4
# 2. Add delays
--tpslimit 2 --tpslimit-burst 0
# 3. Use your own OAuth Client ID
# (in rclone config)
Expired Token
# Regenerate token
rclone config reconnect gdrive:
# Or manually
rclone authorize drive
FUSE Mount - Permission Denied
# Check /etc/fuse.conf
grep user_allow_other /etc/fuse.conf
# Uncomment if needed
sudo sed -i 's/#user_allow_other/user_allow_other/' /etc/fuse.conf
# Remount with --allow-other
rclone mount remote: /mnt/point --allow-other
Advanced Diagnostics
# Full debug mode
rclone copy source: dest: -vv --dump headers
# Test connection
rclone lsd remote: --timeout 30s
# Check config
rclone config show remote
# List backend features
rclone backend features remote:
# Network performance test
rclone test bandwidth remote: --time 30s
VeryCloud Production Use Cases
Complete Web Server Backup
#!/usr/bin/env bash
# backup-webserver.sh - VeryCloud VPS
MYSQL_USER="backup"
MYSQL_PASS="$(cat /run/secrets/mysql_backup)"
BACKUP_DIR="/var/backups/web"
REMOTE="b2:verycloud-backups"
DATE=$(date +%Y%m%d)
mkdir -p "${BACKUP_DIR}/${DATE}"
# MySQL dump
mysqldump -u${MYSQL_USER} -p${MYSQL_PASS} --all-databases \
| gzip > "${BACKUP_DIR}/${DATE}/mysql-all.sql.gz"
# Web files
tar -czf "${BACKUP_DIR}/${DATE}/www.tar.gz" -C /var/www .
# Configuration
tar -czf "${BACKUP_DIR}/${DATE}/etc.tar.gz" \
/etc/nginx /etc/php /etc/mysql
# Upload cloud
rclone copy "${BACKUP_DIR}/${DATE}" "${REMOTE}/${DATE}/" \
--transfers 4 \
--b2-hard-delete \
-P
# Local cleanup (7 days)
find "${BACKUP_DIR}" -type d -mtime +7 -exec rm -rf {} +
# Remote cleanup (30 days)
rclone delete "${REMOTE}" --min-age 30d --rmdirs
Media Server with Rclone Mount
For Plex/Jellyfin on VeryCloud VPS:
rclone mount gdrive:Media /mnt/media \
--daemon \
--allow-other \
--uid $(id -u plex) \
--gid $(id -g plex) \
--umask 002 \
--vfs-cache-mode full \
--vfs-cache-max-size 100G \
--vfs-cache-max-age 168h \
--vfs-read-chunk-size 128M \
--buffer-size 512M \
--dir-cache-time 168h \
--log-file /var/log/rclone/media.log \
--cache-dir /var/cache/rclone/media
Quick Commands
# Check used space
rclone size remote:path/
# Cleanup temp files
rclone cleanup remote:
# Web interface
rclone rcd --rc-web-gui --rc-addr :5572
# Compare two remotes
rclone check source: dest: --one-way
# Calculate checksum
rclone hashsum MD5 remote:file.zip
Resources
Official Documentation
- Website: https://rclone.org/
- Docs: https://rclone.org/docs/
- Forum: https://forum.rclone.org/
- GitHub: https://github.com/rclone/rclone
VeryCloud Support
| Channel | Availability |
|---|---|
| Tickets | 24/7 |
| Discord | 600+ members |
| Documentation | docs.verycloud.fr |
| Status | status.verycloud.fr |
Guide written for VeryCloud SAS • Last updated: January 30, 2026


















