Is Rclone slow to connect to Onedrive?Dump upload speed limit? Configure API acceleration

currently using Rclone When transferring files to OneDrive, you may encounter problems such as slow speed, disconnection, etc...

Why is Rclone slow to connect to Onedrive?

The root cause is to trigger the limitation of OneDrive API, and the default Rclone built-in API is used by multiple people at the same time, so these problems are becoming more and more obvious...

Is Rclone slow to connect to Onedrive?Dump upload speed limit? Configure API acceleration

Using the self-built private API to connect to OneDrive can greatly improve these situations, and for the three-month Office 365 E5 developer trial version, occasional use of Rclone will automatically renew the fee, rather than deliberately brushing the API, which is more secure and stable.

In addition, self-built APIs can also be used by other accounts and other applications.

If it is a Google Drive self-built API, please refer to this tutorial ▼

Rclone connect Onedrive speed test

The former is to test the speed of using Rclone's default API to connect to Onedrive▼

Rclone connected to Onedrive speed test The former is the third photo of netizens testing the speed of using Rclone's default API to connect to Onedrive

The latter is a test by netizens to use the Microsoft API they applied for to connect to Onedrive ▼

The latter is the fourth photo of netizens testing the speed of connecting to Onedrive using the Microsoft API they applied for

  • It can be clearly seen that the speed difference is more than 10 times.

How to create Microsoft Onedrive network disk API?

How to get Client ID and Client secret in Microsoft Azure Management Center, please click the link below to see how to create Microsoft Onedrive network disk API ▼

Rclone gets token

Download Rclone on your local computer ▼

Take Windows as an example, go to the folder where rclone.exe is located after decompression, enter cmd in the address bar of the explorer and press Enter to open the command prompt in the current path.

Replace in the following commandClient_ID,Client_secret and execute ▼

rclone authorize "onedrive" "Client_ID" "Client_secret"
  • A browser will pop up next, asking you to log in to your account to authorize it.

After authorization, the following message appears in the command prompt window:

If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth
Log in and authorize rclone for access
Waiting for code...
Got code
Paste the following into your remote machine --->
{"access_token":"xxxxxxxxxxxxxxxxxx","expiry":"2024-05-15T21:18:39.5036298+08:00"}
<---End paste
  • {"access_token":"xxxxxxxxxxxxxxxxxx","expiry":"2024-05-15T21:18:39.5036298+08:00"}This entire content (including the brackets) is the token, copy and save.

Rclone connect to OneDrive

SSH enter the following command▼

rclone config

The following information will appear, please refer to the following instructions to operate ▼

  • Things to noteBecause RCLONE will be updated from time to time, when you see this tutorial, the menu options may change slightly, but the general idea will not change. Don't think about copying the operation.
$ rclone config

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> n # 输入 n,新建
name> onedrive # 输入网盘名称,类似标签,这是用来区别不同的网盘。
Type of storage to configure.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
1 / 1Fichier
\ (fichier)
2 / Akamai NetStorage
\ (netstorage)
3 / Alias for an existing remote
\ (alias)
4 / Amazon Drive
\ (amazon cloud drive)
5 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, Digital Ocean, Dreamhost, IBM COS, Lyve Cloud, Minio, RackCorp, SeaweedFS, and Tencent COS
\ (s3)
6 / Backblaze B2
\ (b2)
7 / Better checksums for other remotes
\ (hasher)
8 / Box
\ (box)
9 / Cache a remote
\ (cache)
10 / Citrix Sharefile
\ (sharefile)
11 / Compress a remote
\ (compress)
12 / Dropbox
\ (dropbox)
13 / Encrypt/Decrypt a remote
\ (crypt)
14 / Enterprise File Fabric
\ (filefabric)
15 / FTP Connection
\ (ftp)
16 / Google Cloud Storage (this is not Google Drive)
\ (google cloud storage)
17 / Google Drive
\ (drive)
18 / Google Photos
\ (google photos)
19 / Hadoop distributed file system
\ (hdfs)
20 / Hubic
\ (hubic)
21 / In memory object storage system.
\ (memory)
22 / Jottacloud
\ (jottacloud)
23 / Koofr, Digi Storage and other Koofr-compatible storage providers
\ (koofr)
24 / Local Disk
\ (local)
25 / Mail.ru Cloud
\ (mailru)
26 / Mega
\ (mega)
27 / Microsoft Azure Blob Storage
\ (azureblob)
28 / Microsoft OneDrive
\ (onedrive)
29 / OpenDrive
\ (opendrive)
30 / OpenStack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
\ (swift)
31 / Pcloud
\ (pcloud)
32 / Put.io
\ (putio)
33 / QingCloud Object Storage
\ (qingstor)
34 / SSH/SFTP Connection
\ (sftp)
35 / Sia Decentralized Cloud
\ (sia)
36 / Storj Decentralized Cloud Storage
\ (storj)
37 / Sugarsync
\ (sugarsync)
38 / Transparently chunk/split large files
\ (chunker)
39 / Union merges the contents of several upstream fs
\ (union)
40 / Uptobox
\ (uptobox)
41 / Webdav
\ (webdav)
42 / Yandex Disk
\ (yandex)
43 / Zoho
\ (zoho)
44 / http Connection
\ (http)
45 / premiumize.me
\ (premiumizeme)
46 / seafile
\ (seafile)
Storage> 28 # 输入28表示选择Microsoft OneDrive
Option client_id.
OAuth Client Id.
Leave blank normally.
Enter a value. Press Enter to leave empty.
client_id> # 输入 Client Id (客户端 ID)
Microsoft App Client Secret
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_secret> # 输入 Client Secret (客户端密码)
Edit advanced config? (y/n)
y) Yes
n) No
y/n> n # 输入 n
Remote config
Make sure your Redirect URL is set to "http://localhost:53682/" in your custom config.
Use auto config?
* Say Y if not sure
* Say N if you are working on a remote or headless machine
y) Yes
n) No
y/n> n # 输入 n
For this to work, you will need rclone available on a machine that has a web browser available.
Execute the following on your machine (same rclone version recommended) :
rclone authorize "onedrive" "client_id" "client_secret"
Then paste the result below:
result> {"access_token":"XXXXXXXXX","expiry":"2024-05-15T21:18:39.5036298+08:00"} # 输入 token
Choose a number from below, or type in an existing value
1 / OneDrive Personal or Business
\ "onedrive"
2 / Root Sharepoint site
\ "sharepoint"
3 / Type in driveID
\ "driveid"
4 / Type in SiteID
\ "siteid"
5 / Search a Sharepoint site
\ "search"
Your choice> 1 # # 这里询问你要选择的类型,因为你使用的是OneDrive,所以输入1
Found 1 drives, please select the one you want to use:
0: OneDrive (business) id=xxxxxxxxxxxxxx
Chose drive to use:> 0 # 检测到网盘,此处号码是0,所以输入0
Found drive 'root' of type 'business', URL: https:// xxx.sharepoint. com/personal/xxxxxx/Documents
Is that okay?
y) Yes
n) No
y/n> y # 请你确认,如果没有问题,请输入 y

--------------------
[od-e5-api]
type = onedrive
client_id = xxxxxxxxxx
client_secret = xxxxxxxxxxxxxxxx
token = {"access_token":"xxxxxxxxxxxxxxxxxx","expiry":"2024-05-15T21:18:39.5036298+08:00"}
drive_id = xxxxxxxxxxxxxxxxxxxxxxxxx
drive_type = business
--------------------
y) Yes this is OK
e) Edit this remote
d) Delete this remote
y/e/d> y # 最后会显示网盘的配置信息,请确认是否准确无误? 如果没有问题,请输入 y
Current remotes:

Name Type
==== ====
onedrive onedrive

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> q # 输入 q 退出
  • So far, Rclone has successfully connected to the OneDrive network disk using the self-built API.

Once configured, you can use the followingrcloneCommand to view:

List directories at the top level of onedrive▼

rclone lsd onedrive:

List all files in onedrive▼

rclone ls onedrive:

Copy the local directory to a directory namedbackuponedrive directory▼

rclone copy /home/source onedrive:backup

Copy Cut Delete Command

Copy the Rclone configuration file to the root directory of the onedrive network disk ▼

rclone copy /root/.config/rclone/rclone.conf onedrive:/

copy local /home/backup Go to the backup directory where the network disk named onedrive is configured, and vice versa ▼

rclone copy --progress /home/backup onedrive:backup
  • by adding this parameter --ignore-existing Files that have been backed up on the network disk can be ignored, which is equivalent to incremental backup ▼
rclone copy --ignore-existing /home/backup onedrive:backup

Copy the local CWP manual backup file to the backup directory of the network disk named onedrive, and vice versa ▼

rclone copy --progress /newbackup/full/manual/accounts/eloha.tar.gz onedrive:cwp-newbackup/full/manual/accounts/

From the onedrive network disk, copy the CWP automatic scheduled backup file to the local /newbackup Catalog▼

rclone copy --progress onedrive:cwp-newbackup/full/daily/Friday/accounts/eloha.tar.gz /newbackup/

rclone copy --progress onedrive:cwp-backup2/ /home/backup2/

From the onedrive network disk, copy the CWP manual backup file to the local /newbackup/newbackup/full/manual/accounts/ Catalog▼

rclone copy --progress onedrive:cwp-newbackup/full/manual/accounts/eloha.tar.gz /newbackup/newbackup/full/manual/accounts/

Copy from onedrive's network diskVestaCPBackup files to local /home/backup Catalog▼

rclone copy --progress onedrive:backup/admin.2018-04-12_13-10-02.tar /home/backup

Move (Cut) Command ▼

rclone move /home/backup onedrive:backup

Delete the backup directory of the network disk with the configuration name onedrive▼

rclone delete onedrive:backup

Create a backup directory that configures a network disk named onedrive ▼

rclone mkdir onedrive:backup

Copy ▼

rclone copy

move ▼

rclone move

delete ▼

rclone delete

Sync ▼

rclone sync

For more Rclone command usage tutorials, please refer to the Rclone command collection below▼

How to mount OneDrive?

If you need to mount to a local directory, you can refer to our previous Rclone mounting tutorial▼

Limitations of OneDrive Private API

Although self-built private APIs can improve the uploading experience, uploading may be limited if used too frequently.

What is the maximum limit threshold for the Microsoft OneDrive API?

Microsoft has not clearly stated what the maximum limit threshold of the OneDrive API is. The following is the original document:

Based on usage, we fine-tune the thresholds so that users can use the maximum amount of resources without compromising reliability and performance.

  • As you can guess from looking at the description of other types of API limits, there are two limits, total and frequency.
  • The total is the number of calls that can be made in a day, and the frequency is the number of calls that can be made per minute.
  • And once the throttling threshold is reached, file uploads are throttled.
  • Since the exact value cannot be obtained from the official documentation, is it possible to get this exact value through actual testing?
  • the answer is negative.No rules were found in the actual test, so this limit is dynamically adjusted and conforms to the official documentation.

How can I avoid being restricted by the OneDrive API?

Do not upload too many files in a short period of time, the file size does not matter, the key is the number of files.

About Office 365 E5 automatic renewal:

  • According to the experience of users using the developer trial version for many years, as long as you use the self-built private API, you can renew the subscription.
  • As for frequency, there is no standard, and the more the better.
  • Deliberately brushing the API may not be worth the loss, especially using GitHub Actions, because the server is Microsoft Azure, so many people use similar methods to brush the API meaningless, and Microsoft Azure wants to identify it easily.

Hope Chen Weiliang Blog ( https://www.chenweiliang.com/ ) shared "Rclone is slow to connect to Onedrive?Dump upload speed limit? Configure API acceleration" to help you.

Welcome to share the link of this article:https://www.chenweiliang.com/cwl-27906.html

Welcome to the Telegram channel of Chen Weiliang's blog to get the latest updates!

🔔 Be the first to get the valuable "ChatGPT Content Marketing AI Tool Usage Guide" in the channel top directory! 🌟
📚 This guide contains huge value, 🌟This is a rare opportunity, don’t miss it! ⏰⌛💨
Share and like if you like!
Your sharing and likes are our continuous motivation!

 

Comment

Your email address will not be published. Required fields * Callout

scroll to top