Na Rclone e lieha ho hokela Onedrive?Lahla moeli oa lebelo la ho kenya? Lokisa ho potlakisa API

E sebelisoa Leholiotsoana Ha o fetisetsa lifaele ho OneDrive, o kanna oa kopana le lebelo le liehang, ho khaoha, joalo-joalo...

Hobaneng ha Rclone e lieha ho hokela Onedrive?

Motso oa sesosa ke ho etsa hore ho be le moeli oa OneDrive API, 'me API ea kamehla ea Rclone e hahiloeng e sebelisoa ke batho ba bangata ka nako e le' ngoe, kahoo mathata ana a ntse a bonahala haholoanyane ...

Na Rclone e lieha ho hokela Onedrive?Lahla moeli oa lebelo la ho kenya? Lokisa ho potlakisa API

Ho sebelisa API ea poraefete e iketselitseng ho hokela OneDrive ho ka ntlafatsa maemo ana haholo, 'me bakeng sa mofuta oa liteko oa likhoeli tse tharo oa Office 365 E5, tšebeliso ea nako le nako ea Rclone e tla nchafatsa tefo, ho fapana le ho hlakola API ka boomo, e leng ho feta. e sireletsehileng le e tsitsitseng.

Ho feta moo, li-API tse iketselitseng li ka boela tsa sebelisoa ke li-account tse ling le lits'ebetso tse ling.

Haeba ke Google Drive e iketselitseng API, ka kopo sheba thuto ena ▼

Rclone hokela teko ea lebelo ea Onedrive

Ea pele ke ho leka lebelo la ho sebelisa Rclone's default API ho hokela Onedrive▼

Rclone e hokahaneng le teko ea lebelo ea Onedrive Ea pele ke foto ea boraro ea basebelisi ba marang-rang ba lekang lebelo la ho sebelisa Rclone's default API ho hokela Onedrive.

Ea morao-rao ke teko ea basebelisi ba marang-rang ho sebelisa Microsoft API eo ba e kopileng ho hokela ho Onedrive ▼

Ea ho qetela ke foto ea bone ea basebelisi ba marang-rang ba lekang lebelo la ho hokela Onedrive ba sebelisa Microsoft API eo ba e kopileng.

  • Ho ka bonoa ka ho hlaka hore phapang ea lebelo e feta makhetlo a 10.

Mokhoa oa ho theha Microsoft Onedrive network disk API?

Mokhoa oa ho fumana ID ea Client le lekunutu la Client Setsing sa Tsamaiso sa Microsoft Azure, ka kopo, tobetsa sehokelo se ka tlase ho bona mokhoa oa ho theha Microsoft Onedrive network disk API ▼

Rclone e fumana letšoao

Khoasolla Rclone komporong ea hau ea lehae ▼

Nka Windows e le mohlala, e-ea foldareng moo rclone.exe e leng teng ka mor'a ho senyeha, kenya cmd ka har'a bar ea aterese ea mofuputsi ebe o tobetsa Enter ho bula molaetsa oa taelo tseleng ea hona joale.

Kenya sebaka ka taelo e latelangClient_ID,Client_secret ebe o etsa ▼

rclone authorize "onedrive" "Client_ID" "Client_secret"
  • Sebatli se tla hlaha kamora moo, se u kopa hore u kene akhaonteng ea hau ho e lumella.

Ka mor'a tumello, molaetsa o latelang o hlaha fensetereng ea taelo ea litaelo:

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"}Litaba tsena kaofela (ho kenyeletsoa le li-brackets) ke letšoao, kopitsa le ho boloka.

Rclone e hokela ho OneDrive

SSH kenya taelo e latelang▼

rclone config

Lintlha tse latelang li tla hlaha, ka kopo sheba litaelo tse latelang ho sebetsa ▼

  • Tlhokomeliso:Hobane RCLONE e tla ntlafatsoa nako le nako, ha u bona thupelo ena, likhetho tsa menyetla li ka fetoha hanyane, empa mohopolo o akaretsang o ke ke oa fetoha.
$ 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 退出
  • Ho fihlela joale, Rclone e atlehile ho hokahanya le disk ea marang-rang ea OneDrive a sebelisa API e ikemetseng.

Hang ha u se u hlophisitse, u ka sebelisa se latelangrcloneTaelo ea ho sheba:

Etsa lethathamo la li-directory maemong a holimo a onedrive▼

rclone lsd onedrive:

Thathamisa lifaele tsohle ho onedrive▼

rclone ls onedrive:

Kopitsa bukana ea lehae bukeng e bitsoangbackuponedrive directory▼

rclone copy /home/source onedrive:backup

Kopitsa Seha Tlosa Taelo

Kopitsa faele ea tlhophiso ea Rclone bukeng ea motso ea onedrive network disk ▼

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

kopitsa sebakeng seo /home/backup Eya ho "backup directory" moo "network disk" e bitsoang onedrive e hlophisitsoeng, 'me ka tsela e fapaneng ▼

rclone copy --progress /home/backup onedrive:backup
  • ka ho eketsa parameter ena --ignore-existing Lifaele tse bolokiloeng ho "network disk" li ka hlokomolohuoa, tse lekanang le "backup" e ntseng e eketseha ▼
rclone copy --ignore-existing /home/backup onedrive:backup

Kopitsa faele ea "backup" ea CWP bukeng ea "backup" ea "network disk" e bitsoang onedrive, 'me ka tsela e fapaneng ▼

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

Ho tsoa ho onedrive network disk, kopitsa faele ea "backup" e hlophisitsoeng ea CWP sebakeng sa heno /newbackup Catalog▼

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

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

Ho tsoa ho onedrive network disk, kopitsa faele ea bekapo ea CWP sebakeng sa heno /newbackup/newbackup/full/manual/accounts/ Catalog▼

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

Kopitsa ho tsoa ho netweke disk ea onedriveVestaCPBoloka lifaele ho ea sebakeng sa heno /home/backup Catalog▼

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

Tsamaisa (Seha) Taelo ▼

rclone move /home/backup onedrive:backup

Hlakola bukana ea "backup" ea "network disk" ka lebitso la tlhophiso onedrive▼

rclone delete onedrive:backup

Theha buka ea ho boloka bekapo e hlophisang disk ea netweke e bitsoang onedrive ▼

rclone mkdir onedrive:backup

Kopitsa ▼

rclone copy

tsamaisa ▼

rclone move

hlakola ▼

rclone delete

Khokahanya ▼

rclone sync

Bakeng sa lithupelo tse ling tsa tšebeliso ea taelo ea Rclone, ka kopo sheba pokello ea litaelo tsa Rclone ka tlase▼

Mokhoa oa ho kenya OneDrive joang?

Haeba o hloka ho hloella bukeng ea lehae, o ka sheba thuto ea rona e fetileng ea ho kenya Rclone▼

Meeli ea OneDrive Private API

Leha li-API tsa poraefete tse iketselitseng li ka ntlafatsa boiphihlelo ba ho kenya, ho kenya ho ka fokotsoa ha ho sebelisoa khafetsa.

Moeli o ka holimo oa moeli oa Microsoft OneDrive API ke ofe?

Microsoft ha e so hlalose ka ho hlaka hore na moeli o phahameng oa OneDrive API ke ofe. Se latelang ke tokomane ea mantlha:

Ho ipapisitsoe le ts'ebeliso, re lokisa maemo e le hore basebelisi ba ka sebelisa boholo ba lisebelisoa ntle le ho senya ts'epahalo le ts'ebetso.

  • Joalokaha u ka hakanya ka ho sheba tlhaloso ea mefuta e meng ea meeli ea API, ho na le meeli e 'meli, kakaretso le maqhubu.
  • Palo kaofela ke palo ea mehala e ka etsoang ka letsatsi, 'me khafetsa ke palo ea mehala e ka etsoang ka motsotso.
  • 'Me hang ha moeli oa throttling o fihletsoe, ho kenngoa ha lifaele hoa fokotseha.
  • Kaha boleng bo nepahetseng bo ke ke ba fumanoa litokomaneng tsa molao, na hoa khoneha ho fumana boleng bona bo nepahetseng ka tlhahlobo ea sebele?
  • karabo e mpe.Ha ho melao e fumanoeng tekong ea sebele, kahoo moeli ona o fetoloa ka matla 'me o lumellana le litokomane tsa molao.

Nka qoba ho thibeloa joang ke OneDrive API?

Se ke oa kenya lifaele tse ngata haholo ka nako e khuts'oane, boholo ba faele ha bo na taba, senotlolo ke palo ea lifaele.

Mabapi le ho nchafatsa Office 365 E5:

  • Ho latela boiphihlelo ba basebelisi ba sebelisang mofuta oa teko ea nts'etsopele ka lilemo tse ngata, ha feela o sebelisa API e ikemetseng e ikemetseng, o ka nchafatsa ngoliso.
  • Ha e le khafetsa, ha ho na maemo, 'me ho molemo ho feta.
  • Ho hlatsoa API ka boomo ho ka 'na ha se ke ha e-ba molemo ho lahleheloa, haholo-holo ho sebelisa GitHub Actions, hobane seva ke Microsoft Azure, batho ba bangata ba sebelisa mokhoa o ts'oanang oa ho phunya API e se nang moelelo, Microsoft Azure e batla ho e khetholla e bonolo.

Hope Chen Weiliang Blog ( https://www.chenweiliang.com/ ) o kopane "Rclone e lieha ho hokela Onedrive?Lahla moeli oa lebelo la ho kenya? Lokisa ho potlakisa API" ho u thusa.

Rea u amohela ho arolelana sehokelo sa sengoloa sena:https://www.chenweiliang.com/cwl-27906.html

Rea u amohela ho mocha oa Telegraph oa blog ea Chen Weiliang ho fumana lintlha tsa morao-rao!

🔔 Eba oa pele oa ho fumana Tataiso ea Tšebeliso ea "ChatGPT Content Marketing AI" ea bohlokoa bukeng ea holimo ea seteishene! 🌟
📚 Tataiso ena e na le boleng bo boholo, 🌟Ona ke monyetla o sa tloaelehang, se ke oa o fetoa! ⏰⌛💨
Share le rata haeba u rata!
Ho arolelana le lintho tseo u li ratang ke khothatso ea rona e tsoelang pele!

 

Comments

Aterese ea hau ea lengolo tsoibila e ke ke ea phatlalatsoa. Ho sebelisoa masimo a hlokahalang * Letšoao

tsamaisetsa hodimo