POST INSTALLATION AND ONGOING PROCEDURE UPDATE:¶
After you do this initially, what you want to do is run Rclone in the dry run mode to see if there's anything that needs to be updated, and then you just run the same command without the dry run flag.
rclone copy onedrive:/ /media/mark/Ext_T7_lpthp/OneDrive --dry-run -P --update --exclude "Personal Vault/**"
Rclone Setup for OneDrive on Linux¶
Overview¶
This guide documents the complete setup process for using rclone to access Microsoft OneDrive from Linux Mint. Rclone is a command-line tool that syncs files and directories to and from cloud storage services using their native APIs.
Important: Customize for Your System¶
This guide was created for a specific setup. You will need to adjust these paths for your own system:
- Username: Replace
/home/mark/with/home/YOUR_USERNAME/ - External drive: Replace
/media/mark/Ext_T7_lpthp/with your own drive mount point - Find yours with:
lsblkor check/media/YOUR_USERNAME/ - Remote name: "OneDrive" is used throughout - you can use any name you want
- Drive selection: When configuring, your OneDrive options may be numbered differently
The core process (install → configure → authenticate → copy) is universal and works for everyone.
Initial Installation¶
Configuration Process¶
Step 1: Start Configuration¶
You'll see:
Choose: n (New remote)
Step 2: Name Your Remote¶
You can use any name you want - this is just the label rclone will use in commands.
Step 3: Select Storage Type¶
From the numbered list of storage providers, choose:
(Option 30 is "Microsoft OneDrive")
Step 4: OAuth Client Settings¶
You don't need custom OAuth credentials for personal OneDrive access.
Step 5: Choose Region¶
Unless you're using a government or special regional OneDrive account, use the default global option.
Step 6: Advanced Config¶
No advanced configuration needed for basic usage.
Step 7: Auto Configuration¶
This will open a browser window for Microsoft authentication. Log in with your Microsoft account and authorize rclone.
Step 8: Select Drive Type¶
Choose "OneDrive Personal or Business"
Step 9: Select Your Drive¶
You'll see a list of available drives:
Choose option 2 (your main "OneDrive (personal)")
Step 10: Confirm Configuration¶
Step 11: Exit Configuration¶
Configuration is now complete!
Essential Workflow: The Two-Step Process¶
This is the core of how you'll use rclone. Follow these two steps every time:
STEP 1: Dry Run (Always Do This First!)¶
See what would be copied WITHOUT actually copying anything:
This shows you: - What files would be copied - How much data would transfer - If there are any errors
Look at the output carefully before proceeding!
STEP 2: Actual Copy (Only After Dry Run Looks Good)¶
Once you're satisfied with what the dry run showed, run the real copy:
What each flag means:
- onedrive:/ - source (your OneDrive root)
- /media/mark/Ext_T7_lpthp/OneDrive - destination on external drive
- --dry-run - (dry run only) don't actually copy, just show what would happen
- -P - show progress during transfer
- --exclude "Personal Vault/**" - skip Personal Vault folder (prevents errors)
About Personal Vault¶
Personal Vault requires special authentication that rclone can't handle. We exclude it to avoid error messages cluttering the output. If you need those files, download them manually from OneDrive.live.com.
How Rclone Works Going Forward¶
Key Concept: Rclone Does NOT Auto-Sync¶
Important: Rclone is NOT like Dropbox or OneDrive's native clients. It does not automatically sync in the background. You must manually run rclone commands whenever you want to sync.
Copy vs Sync Commands¶
rclone copy (what we used)
- Copies files from source to destination
- Does NOT delete files at destination that don't exist at source
- Safe for one-way transfers
- Use when: You want to pull down files without risking deletion
rclone sync
- Makes destination exactly match source
- WILL DELETE files at destination that don't exist at source
- Use with caution!
- Use when: You want exact mirror of OneDrive
Example: Update Your Local Copy¶
To pull down any new or changed files from OneDrive:
Example: Upload Local Changes to OneDrive¶
Note: source and destination are reversed.
Example: Two-Way Sync (Advanced)¶
For true two-way sync where changes go both directions:
The --interactive flag will ask before making destructive changes.
Useful Rclone Features¶
Check What's Different¶
See what would be copied without actually copying:
List Remote Files¶
Browse your OneDrive without downloading:
For a tree-style view:
List only directories:
Download Specific Folder¶
Instead of everything, download just one folder:
Bandwidth Limiting¶
Limit upload/download speed if you don't want rclone hogging bandwidth:
This limits to 5 MB/s.
Show Transfer Stats¶
Get detailed statistics after transfer:
Mount OneDrive as File system (Advanced)¶
You can mount OneDrive like a regular directory:
Files are downloaded on-demand when you access them. To unmount:
Warning: Mounting can be slow over the internet and has some quirks. Best for occasional access, not primary workflow.
Ongoing Usage Strategy¶
Recommended Workflow¶
Since rclone doesn't auto-sync, here's a practical approach:
- For backups: Run
rclone copymanually whenever you want to back up OneDrive locally - Schedule it (optional): Set up a cron job or systemd timer if you want automatic backups
- Before major changes: Always do a dry run first with
--dry-run - Keep it simple: Use
copyinstead ofsyncunless you're certain you want exact mirroring
Setting Up Automatic Backups (Optional)¶
If you want daily backups from OneDrive to your external drive:
-
Create a script:
/home/mark/scripts/backup-onedrive.sh#!/bin/bash # Check if external drive is mounted if [ -d "/media/mark/Ext_T7_lpthp" ]; then rclone copy onedrive:/ /media/mark/Ext_T7_lpthp/OneDrive \ --log-file=/home/mark/logs/rclone-backup.log \ --exclude "Personal Vault/**" else echo "External drive not mounted" >> /home/mark/logs/rclone-backup.log fi -
Make it executable:
-
Add to crontab for daily 2 AM backups:
Add line:
Note: Only useful if your external drive stays connected.
Why Rclone Over Other Methods¶
vs rsync¶
- rsync: Only works with filesystems you can already access (local, SSH, etc.)
- rclone: Speaks cloud provider APIs directly (OneDrive, Google Drive, S3, etc.)
- You cannot use rsync with OneDrive unless you first mount it as a filesystem
vs abraunegg/onedrive¶
- abraunegg: Full bidirectional sync daemon (like native OneDrive client)
- rclone: Simple, command-line driven, no daemon required
- For one-time or manual syncs, rclone is simpler
- For always-on sync like Dropbox, abraunegg is better
vs Web Interface¶
- Web: Manual downloads only, no automation
- rclone: Scriptable, can handle large transfers, resume capability
Common Commands Reference¶
# List configured remotes
rclone listremotes
# Get info about OneDrive quota/usage
rclone about onedrive:
# Download everything (excluding Personal Vault)
rclone copy onedrive:/ /path/to/local -P --exclude "Personal Vault/**"
# Upload everything
rclone copy /path/to/local onedrive:/ -P
# Sync local to match OneDrive exactly (DELETES local files not in OneDrive)
rclone sync onedrive:/ /path/to/local -P --interactive --exclude "Personal Vault/**"
# Check differences without copying
rclone check /path/to/local onedrive:/
# Browse remote files
rclone ls onedrive:/
rclone tree onedrive:/Documents
# Download specific folder
rclone copy onedrive:/Photos /path/to/local/Photos -P
# Delete old remote configuration
rclone config delete onedrive
# Re-authorize (if token expires)
rclone config reconnect onedrive:
Troubleshooting¶
Token Expired¶
If you get authentication errors after months of not using rclone:
This will refresh your OAuth token.
Can't Access Personal Vault¶
This is expected. Personal Vault requires special authentication. Either:
- Download those files manually from onedrive.live.com
- Use --exclude "Personal Vault/**" to skip it
Transfer Speed Issues¶
If transfers are slow:
- Check your internet connection
- Try --transfers 4 to increase parallel transfers (default is 4)
- Use --bwlimit if you're saturating your connection and need to limit speed
Verifying File Integrity¶
After large transfers, verify everything copied correctly:
Additional Resources¶
- Official rclone docs: https://rclone.org/
- OneDrive-specific docs: https://rclone.org/onedrive/
- rclone forum: https://forum.rclone.org/
Adding Google Drive¶
Rclone supports Google Drive using the same rclone config process. The key differences from OneDrive setup are noted below.
Google Drive Configuration Steps¶
Choose n for new remote, give it a name (e.g. google-mark), then select Google Drive from the numbered list.
Key differences from OneDrive setup:
client_idandclient_secret- leave both blank, press Enter- Scope - choose
1(Full access all files) - do NOT leave blank service_account_file- leave blank, press Enter- Advanced config - choose
n - Auto config - choose
y(opens browser for Google authentication) - Shared Drive (Team Drive) - choose
nfor personal Google Drive
Important note about Google Docs/Sheets/Slides:
Google's native formats don't exist as real files - rclone converts them on download:
- Google Docs → .docx
- Google Sheets → .xlsx
- Google Slides → .pptx
Regular files (PDFs, images, videos) download exactly as-is with no conversion.
Multiple Google Accounts¶
If you have more than one Google account, run rclone config again and create a separate remote for each one with a different name (e.g. google-mark, google-calabiyau19). Give each account its own destination folder on your external drive to avoid files from different accounts mixing together.
Google Drive Dry Run¶
Google Drive Actual Copy¶
No Personal Vault exclusion needed for Google Drive.
Adding Dropbox¶
Same rclone config process - choose Dropbox from the numbered list, leave client ID and secret blank, use auto config to authenticate in browser.
Dropbox Dry Run¶
Dropbox Actual Copy¶
Syncing All Cloud Services with One Script¶
Once all remotes are configured, a single script handles all four services sequentially. The script lives at ~/Scripts/sync-from-onedrive-google-dropbox.sh.
The script checks that the external drive is mounted before doing anything, then runs each service in order:
#!/bin/bash
# Sync all cloud storage to external drive
# External drive must be mounted at /media/mark/Ext_T7_lpthp before running
EXTERNAL="/media/mark/Ext_T7_lpthp"
# Check external drive is mounted
if [ ! -d "$EXTERNAL" ]; then
echo "ERROR: External drive not mounted at $EXTERNAL - aborting"
exit 1
fi
echo "===== Starting cloud sync $(date) ====="
echo ""
echo "--- Syncing OneDrive ---"
rclone copy onedrive:/ $EXTERNAL/OneDrive -P --exclude "Personal Vault/**"
echo ""
echo "--- Syncing Google Drive (mark) ---"
rclone copy google-mark:/ $EXTERNAL/GoogleDrive-mark -P
echo ""
echo "--- Syncing Google Drive (calabiyau19) ---"
rclone copy google-calabiyau19:/ $EXTERNAL/GoogleDrive-calabiyau19 -P
echo ""
echo "--- Syncing Dropbox ---"
rclone copy dropbox-mark:/ $EXTERNAL/Dropbox -P
echo ""
echo "===== Cloud sync complete $(date) ====="
Make it executable:
Run it:
Current Remote Configuration¶
Name Type
==== ====
dropbox-mark dropbox
google-calabiyau19 drive
google-mark drive
onedrive onedrive
Local folders on external drive:
- /media/mark/Ext_T7_lpthp/OneDrive
- /media/mark/Ext_T7_lpthp/GoogleDrive-mark
- /media/mark/Ext_T7_lpthp/GoogleDrive-calabiyau19
- /media/mark/Ext_T7_lpthp/Dropbox
Summary¶
- Rclone is installed and configured for OneDrive, two Google Drive accounts, and Dropbox
- Use
rclone copyfor safe one-way transfers - never deletes files - Use
rclone syncwith caution (can delete files) - Rclone does NOT auto-sync - you must run it manually
- Personal Vault cannot be accessed via rclone - download manually from onedrive.live.com
- Google Docs/Sheets/Slides are converted to .docx/.xlsx/.pptx on download
- Run all four services at once with
~/Scripts/sync-from-onedrive-google-dropbox.sh