Isalathiso senqaku
usebenzisa ngoku Inkanyamba Xa uthumela iifayile kwi-OneDrive, unokuhlangabezana neengxaki ezifana nesantya esicothayo, uqhawulo, njl..
Kutheni i-Rclone icotha ukuqhagamshela kwi-Onedrive?
Ingcambu yesizathu kukubangela umda we-OneDrive API, kwaye i-API engagqibekanga eyakhelwe-ngaphakathi ye-Rclone isetyenziswa ngabantu abaninzi ngexesha elinye, ngoko ke ezi ngxaki ziya zibonakala ngakumbi ...
Ukusebenzisa i-API yabucala eyakhelweyo ukuqhagamshela kwi-OneDrive kunokuphucula kakhulu ezi meko, kwaye kwiinyanga ezintathu ze-Ofisi 365 E5 inguqulo yovavanyo yomphuhlisi, ukusetyenziswa kwamathuba athile kwe-Rclone kuya kuhlaziya umrhumo ngokuzenzekelayo, kunokuxubha ngabom i-API, engaphezulu. ikhuselekile kwaye izinzile.
Ukongeza, ii-API ezakhelwe ngokwazo zingasetyenziselwa ezinye iiakhawunti kunye nezinye izicelo.
Ukuba yi-API kaGoogle eyakhelwe yona, nceda ubhekisele kwesi sifundo ▼
I-Rclone idibanisa uvavanyo lwesantya se-Onedrive
Eyangaphambili kukuvavanya isantya sokusebenzisa i-API engagqibekanga ye-Rclone ukuqhagamshela kwi-Onedrive▼
Olu lwamva luvavanyo lwabasebenzisi be-intanethi ukusebenzisa iMicrosoft API abafake isicelo sayo ukuqhagamshela kwi-Onedrive ▼
- Ingabonwa ngokucacileyo ukuba umehluko wesantya ungaphezulu kwamaxesha e-10.
Uyenza njani iMicrosoft Onedrive network disk API?
Ungasifumana njani isazisi soMthengi kunye nemfihlo yoMthengi kwiZiko loLawulo le-Microsoft Azure, nceda ucofe ikhonkco elingezantsi ukuze ubone ukuba uyenza njani iMicrosoft Onedrive network disk API ▼
URclone ufumana uphawu
Khuphela iRclone kwikhompyuter yakho yasekhaya ▼
Thatha iWindows njengomzekelo, yiya kwifolda apho i-rclone.exe ikhona khona emva kokunciphisa, faka i-cmd kwibar yedilesi yomhloli kwaye ucinezele u-Enter ukuvula umyalelo womyalelo kwindlela yangoku.
Faka endaweni yalo myalelo ulandelayoClient_ID
,Client_secret
kwaye uphumeze ▼
rclone authorize "onedrive" "Client_ID" "Client_secret"
- Isikhangeli siya kuvela ngokulandelayo, sikucela ukuba ungene kwiakhawunti yakho ukuyigunyazisa.
Emva kogunyaziso, lo myalezo ulandelayo uvela kwifestile yomyalelo womyalelo:
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"}
Lo mxholo wonke (kubandakanywa nezibiyeli) ngumqondiso, kopisha kwaye ugcine.
Rclone qhagamshela kwi-OneDrive
SSH ngenisa lo myalelo ulandelayo▼
rclone config
Olu lwazi lulandelayo luya kuvela, nceda ujonge le miyalelo ilandelayo ukuze usebenze ▼
- Qaphela:Ngenxa yokuba i-RCLONE iya kuhlaziywa kumaxesha ngamaxesha, xa ubona esi sifundo, iinketho zemenyu zinokutshintsha kancinci, kodwa umbono jikelele awuyi kutshintsha.
$ 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 退出
- Ukuza kuthi ga ngoku, i-Rclone iqhagamshele ngempumelelo kwidiski yenethiwekhi ye-OneDrive isebenzisa i-API ezakhelwe yona.
Nje ukuba iqwalaselwe, ungasebenzisa oku kulandelayorclone
Umyalelo wokujongwa:
Dwelisa abalawuli kwinqanaba eliphezulu le-onedrive▼
rclone lsd onedrive:
Dwelisa zonke iifayile kwi-onedrive▼
rclone ls onedrive:
Khuphela uvimba weefayili wendawo kulawulo olunegamabackup
onedrive directory▼
rclone copy /home/source onedrive:backup
Khuphela Sika Cima Umyalelo
Khuphela ifayile yoqwalaselo ye-Rclone kulawulo lweengcambu ze-onedrive network disk ▼
rclone copy /root/.config/rclone/rclone.conf onedrive:/
ikopi yendawo /home/backup
Yiya kulawulo logcino apho idisk yomsebenzi womnatha ebizwa ngokuba yi onedrive iqwalaselwe, kwaye ngokuchaseneyo ▼
rclone copy --progress /home/backup onedrive:backup
- ngokongeza le parameter
--ignore-existing
Iifayile ezigcinwe ngogcino kwidiski yothungelwano zingahoywa, nto leyo elingana nogcino olunyusiweyo ▼
rclone copy --ignore-existing /home/backup onedrive:backup
Khuphela ifayile yogcino lwencwadi ye-CWP yasekhaya kulawulo logcino lwediski yenethiwekhi ebizwa ngokuba yi-onedrive, kwaye ngokuchaseneyo ▼
rclone copy --progress /newbackup/full/manual/accounts/eloha.tar.gz onedrive:cwp-newbackup/full/manual/accounts/
Ukusuka kwidiski yenethiwekhi ye-onedrive, khuphela ifayile yogcino ecwangcisiweyo ye-CWP kwindawo yasekhaya /newbackup
Ikhathalogu▼
rclone copy --progress onedrive:cwp-newbackup/full/daily/Friday/accounts/eloha.tar.gz /newbackup/ rclone copy --progress onedrive:cwp-backup2/ /home/backup2/
Ukusuka kwidiski yenethiwekhi ye-onedrive, khuphela ifayile yogcino lwe-CWP yesandla kwindawo yasekhaya /newbackup/newbackup/full/manual/accounts/
Ikhathalogu▼
rclone copy --progress onedrive:cwp-newbackup/full/manual/accounts/eloha.tar.gz /newbackup/newbackup/full/manual/accounts/
Khuphela kwidiski yenethiwekhi ye-onedriveVestaCPGcina iifayile kwindawo /home/backup
Ikhathalogu▼
rclone copy --progress onedrive:backup/admin.2018-04-12_13-10-02.tar /home/backup
Shenxisa (Sika) Umyalelo ▼
rclone move /home/backup onedrive:backup
Cima uvimba weefayili wogcino lwediski yenethiwekhi ngegama loqwalaselo onedrive▼
rclone delete onedrive:backup
Yenza uvimba weefayili ogcina idiski yothungelwano ebizwa ngokuba yi-onedrive ▼
rclone mkdir onedrive:backup
Khuphela ▼
rclone copy
shukuma ▼
rclone move
cima ▼
rclone delete
Ngqamanisa ▼
rclone sync
Ngolunye ufundisiso lokusetyenziswa komyalelo weRclone, nceda ubhekisele kwingqokelela yomyalelo weRclone ngezantsi▼
Uyifaka njani i-OneDrive?
Ukuba ufuna ukunyusela kulawulo lwasekhaya, ungabhekisa kwisifundo sethu sangaphambili sokunyusela iRclone▼
Imida ye-OneDrive Private API
Nangona ii-APIs zabucala ezakhelwe ngokwazo zinokuphucula amava okulayisha, ukulayisha kunokunqanyulwa ukuba kusetyenziswe rhoqo.
Ngowuphi owona mda uphezulu weMicrosoft OneDrive API?
IMicrosoft ayikhange ichaze ngokucacileyo ukuba ngowuphi owona mda weOneDrive API. Oku kulandelayo luxwebhu loqobo:
Ngokusekwe kusetyenziso, silungisa imida ukuze abasebenzisi basebenzise obona buninzi bezibonelelo ngaphandle kokubeka esichengeni ukuthembeka nokusebenza.
- Njengoko unokuqikelela ekujongeni inkcazo yezinye iintlobo zemida ye-API, kukho imida emibini, iyonke kunye ne-frequency.
- Iyonke linani leefowuni ezinokufowunwa ngosuku, kwaye amaxesha amaninzi linani leefowuni ezinokutsalwa ngomzuzu.
- Kwaye nje ukuba i-threshold ye-throttling ifikelelwe, ukulayishwa kweefayile kuyacuthwa.
- Ekubeni ixabiso elichanekileyo alinakufunyanwa kumaxwebhu asemthethweni, ngaba eli xabiso lichanekileyo linokufunyanwa ngovavanyo lwangempela?
- impendulo ithi negative.Akukho migaqo ifunyenwe kuvavanyo lwangempela, ngoko ke lo mda uhlengahlengiswa ngamandla kwaye uhambelana namaxwebhu asemthethweni.
Ndingakuphepha njani ukuthintelwa yi-OneDrive API?
Musa ukulayisha iifayile ezininzi ngexesha elifutshane, ubungakanani befayile abunamsebenzi, isitshixo linani leefayile.
Malunga nohlaziyo oluzenzekelayo lweOfisi 365 E5:
- Ngokwamava abasebenzisi abasebenzisa inguqulo yesilingo somphuhlisi iminyaka emininzi, ukuba nje usebenzisa i-API yabucala eyakhelweyo, unokuhlaziya ubhaliso.
- Ngokubhekiselele kwi-frequency, akukho mgangatho, kwaye ngakumbi ngcono.
- Ukuxubha ngamabomu i-API ayinakufaneleka ukulahlekelwa, ngakumbi ukusebenzisa i-GitHub Actions, kuba umncedisi yiMicrosoft Azure, abantu abaninzi basebenzisa iindlela ezifanayo ukuxubha i-API engenanto, kwaye iMicrosoft Azure ifuna ukuyichonga ngokulula.
Ndiyathemba Chen Weiliang Blog ( https://www.chenweiliang.com/ ) kwabelwana "I-Rclone iyacotha ukudibanisa kwi-Onedrive?Lahla umda wesantya sokulayisha? Qwalasela iAPI yokukhawulezisa" ukukunceda.
Wamkelekile ukwabelana ngekhonkco leli nqaku:https://www.chenweiliang.com/cwl-27906.html
Wamkelekile kwisitishi seTelegram sebhlog kaChen Weiliang ukufumana uhlaziyo lwamva nje!
📚 Esi sikhokelo sinexabiso elikhulu, 🌟Eli lithuba elinqabileyo, ungaliphoswa! ⏰⌛💨
Yabelana kwaye uthanda ukuba uyathanda!
Ukwabelana kwakho kunye nezinto ozithandayo ziyinkuthazo yethu eqhubekayo!