首页 > 其他分享 >202406-如何使用新版本的rclone在服务器上挂载onedrive e5

202406-如何使用新版本的rclone在服务器上挂载onedrive e5

时间:2024-06-12 17:33:54浏览次数:31  
标签:remote rclone 巴拉巴 Storage onedrive 202406 type Cloud

前情提要:这位老哥里面写的教程,因为rclone更新了所以有点不一样了,仅作记录

在本地(带浏览器)操作

No remotes found, make a new one?
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n

Enter name for new remote.
name> od

Option Storage.
Type of storage to configure.
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 S3 Compliant Storage Providers including AWS, Alibaba, ArvanCloud, Ceph, ChinaMobile, Cloudflare, DigitalOcean, Dreamhost, GCS, HuaweiOBS, IBMCOS, IDrive, IONOS, LyveCloud, Leviia, Liara, Linode, Minio, Netease, Petabox, RackCorp, Rclone, Scaleway, SeaweedFS, StackPath, Storj, Synology, TencentCOS, Wasabi, Qiniu and others
   \ (s3)
 5 / Backblaze B2
   \ (b2)
 6 / Better checksums for other remotes
   \ (hasher)
 7 / Box
   \ (box)
 8 / Cache a remote
   \ (cache)
 9 / Citrix Sharefile
   \ (sharefile)
10 / Combine several remotes into one
   \ (combine)
11 / Compress a remote
   \ (compress)
12 / Dropbox
   \ (dropbox)
13 / Encrypt/Decrypt a remote
   \ (crypt)
14 / Enterprise File Fabric
   \ (filefabric)
15 / FTP
   \ (ftp)
16 / Google Cloud Storage (this is not Google Drive)
   \ (google cloud storage)
17 / Google Drive
   \ (drive)
18 / Google Photos
   \ (google photos)
19 / HTTP
   \ (http)
20 / Hadoop distributed file system
   \ (hdfs)
21 / HiDrive
   \ (hidrive)
22 / ImageKit.io
   \ (imagekit)
23 / In memory object storage system.
   \ (memory)
24 / Internet Archive
   \ (internetarchive)
25 / Jottacloud
   \ (jottacloud)
26 / Koofr, Digi Storage and other Koofr-compatible storage providers
   \ (koofr)
27 / Linkbox
   \ (linkbox)
28 / Local Disk
   \ (local)
29 / Mail.ru Cloud
   \ (mailru)
30 / Mega
   \ (mega)
31 / Microsoft Azure Blob Storage
   \ (azureblob)
32 / Microsoft Azure Files
   \ (azurefiles)
33 / Microsoft OneDrive
   \ (onedrive)
34 / OpenDrive
   \ (opendrive)
35 / OpenStack Swift (Rackspace Cloud Files, Blomp Cloud Storage, Memset Memstore, OVH)
   \ (swift)
36 / Oracle Cloud Infrastructure Object Storage
   \ (oracleobjectstorage)
37 / Pcloud
   \ (pcloud)
38 / PikPak
   \ (pikpak)
39 / Proton Drive
   \ (protondrive)
40 / Put.io
   \ (putio)
41 / QingCloud Object Storage
   \ (qingstor)
42 / Quatrix by Maytech
   \ (quatrix)
43 / SMB / CIFS
   \ (smb)
44 / SSH/SFTP
   \ (sftp)
45 / Sia Decentralized Cloud
   \ (sia)
46 / Storj Decentralized Cloud Storage
   \ (storj)
47 / Sugarsync
   \ (sugarsync)
48 / Transparently chunk/split large files
   \ (chunker)
49 / Union merges the contents of several upstream fs
   \ (union)
50 / Uptobox
   \ (uptobox)
51 / WebDAV
   \ (webdav)
52 / Yandex Disk
   \ (yandex)
53 / Zoho
   \ (zoho)
54 / premiumize.me
   \ (premiumizeme)
55 / seafile
   \ (seafile)
Storage> 33

Option client_id.
OAuth Client Id.
Leave blank normally.
Enter a value. Press Enter to leave empty.
client_id>

Option client_secret.
OAuth Client Secret.
Leave blank normally.
Enter a value. Press Enter to leave empty.
client_secret>

Option region.
Choose national cloud region for OneDrive.
Choose a number from below, or type in your own string value.
Press Enter for the default (global).
 1 / Microsoft Cloud Global
   \ (global)
 2 / Microsoft Cloud for US Government
   \ (us)
 3 / Microsoft Cloud Germany
   \ (de)
 4 / Azure and Office 365 operated by Vnet Group in China
   \ (cn)
region> 1
Edit advanced config?
y) Yes
n) No (default)
y/n>

回车

Use web browser to automatically authenticate rclone with remote?
 * Say Y if the machine running rclone has a web browser you can use
 * Say N if running rclone on a (remote) machine without web browser access
If not sure try Y. If Y failed, try N.

y) Yes (default)
n) No
y/n>

2024/06/12 16:57:22 NOTICE: If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=IjH巴拉巴拉巴拉巴拉巴拉bMZfpA
2024/06/12 16:57:22 NOTICE: Log in and authorize rclone for access
2024/06/12 16:57:22 NOTICE: Waiting for code...
2024/06/12 16:57:41 NOTICE: Got code
Option config_type.
Type of connection
Choose a number from below, or type in an existing string value.
Press Enter for the default (onedrive).
 1 / OneDrive Personal or Business
   \ (onedrive)
 2 / Root Sharepoint site
   \ (sharepoint)
   / Sharepoint site name or URL
 3 | E.g. mysite or https://contoso.sharepoint.com/sites/mysite
   \ (url)
 4 / Search for a Sharepoint site
   \ (search)
 5 / Type in driveID (advanced)
   \ (driveid)
 6 / Type in SiteID (advanced)
   \ (siteid)
   / Sharepoint server-relative path (advanced)
 7 | E.g. /teams/hr
   \ (path)
config_type> 1

我们这里用的是直接挂载,所以选1

Option config_driveid.
Select drive you want to use
Choose a number from below, or type in your own string value.
Press Enter for the default (b!tdo巴拉巴拉巴拉巴拉巴拉N270p--kn巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉uNSJyh9FkDdClz).
 1 / OneDrive (business)
   \ (b!tdo巴拉巴拉巴拉巴拉巴拉jN270p--knj巴拉巴拉巴拉巴拉巴拉Chg8bDIupzs-GG巴拉巴拉巴拉巴拉巴拉h9FkDdClz)
config_driveid> 1

Drive OK?

Found drive "root" of type "business"
URL: https://巴拉巴拉巴拉巴拉巴拉-my.sharepoint.com/personal/bennyli_巴拉巴拉巴拉巴拉巴拉osoft_com/Documents

y) Yes (default)
n) No
y/n> y

这里有个在浏览器上操作

Configuration complete.
Options:
- type: onedrive
- token: {"access_token":"e这一段是你的token一大堆巴拉巴拉巴拉A","token_type":"Bearer","refresh_token":"0.AXEA4Px6Vm5EHEepvC1qi巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉Vj-Hgd8AgDs_wUA9P-Tp7RFEWyvpyUiBFhqfyIA巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉USii8RQavV-cibNBBUsMJeRhJX5巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉JLvvYO_RoqU8qr0ylsDqTJFcQ_TjosPzFZ1oCmpf9W4hFQMiVIyjGWKihmRydADQkdNP28fqsTQev99b6gpq0mv2_H5WhKapVlG3mhvo6hRL2-I巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉XDYs9Yf1oSZD1u-rf0eI92NHfDgNPkRToRuufMhXo巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉fSgOkp_OnvEN4AeR_TlianFEo4mH8tRuebQYeVBKHc7sH3q1xeT3Ue3-CLzTc_IZkwtsAd7r8oXMKCkUj0A1CrtIt_xVQ7WGHLtkBSyeRVfZaZsYu93Ldh5i2AbD_tFz-jzYiMWCe9SLCO9-d_w7UFIaueJksWy-GOt3kBT6gZn00Y","expiry":"2024-06-12巴拉巴拉巴拉巴拉巴拉巴拉+08:00"}
- drive_id: b!tdoTpA0qSU巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴s-GGAKvWcuNSJyh9FkDdClz
- drive_type: business
Keep this "od" remote?
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d>

这里回车
然后把
{"access_token":"e这一段是你的token一大堆巴拉巴拉巴拉A","token_type":"Bearer","refresh_token":"0.AXEA4Px6Vm5EHEepvC1qi巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉Vj-Hgd8AgDs_wUA9P-Tp7RFEWyvpyUiBFhqfyIA巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉USii8RQavV-cibNBBUsMJeRhJX5巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉JLvvYO_RoqU8qr0ylsDqTJFcQ_TjosPzFZ1oCmpf9W4hFQMiVIyjGWKihmRydADQkdNP28fqsTQev99b6gpq0mv2_H5WhKapVlG3mhvo6hRL2-I巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉XDYs9Yf1oSZD1u-rf0eI92NHfDgNPkRToRuufMhXo巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉fSgOkp_OnvEN4AeR_TlianFEo4mH8tRuebQYeVBKHc7sH3q1xeT3Ue3-CLzTc_IZkwtsAd7r8oXMKCkUj0A1CrtIt_xVQ7WGHLtkBSyeRVfZaZsYu93Ldh5i2AbD_tFz-jzYiMWCe9SLCO9-d_w7UFIaueJksWy-GOt3kBT6gZn00Y","expiry":"2024-06-12巴拉巴拉巴拉巴拉巴拉巴拉+08:00"}
这一段东西复制出去
下面这个不管它

Current remotes:

Name                 Type
====                 ====
od                   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>

第二步 服务器操作

最好用海外的服务器,用国内服务器出现不能操作的问题解决不了
操作类似的
首先安装

curl https://rclone.org/install.sh | sudo bash

然后

root@巴拉巴拉:~# rclone config
2024/06/12 17:03:23 NOTICE: Config file "/root/.config/rclone/rclone.conf" not found - using defaults
No remotes found, make a new one?
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n

Enter name for new remote.
name> od

Option Storage.
Type of storage to configure.
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 S3 Compliant Storage Providers including AWS, Alibaba, ArvanCloud, Ceph, ChinaMobile, Cloudflare, DigitalOcean, Dreamhost, GCS, HuaweiOBS, IBMCOS, IDrive, IONOS, LyveCloud, Leviia, Liara, Linode, Minio, Netease, Petabox, RackCorp, Rclone, Scaleway, SeaweedFS, StackPath, Storj, Synology, TencentCOS, Wasabi, Qiniu and others
   \ (s3)
 5 / Backblaze B2
   \ (b2)
 6 / Better checksums for other remotes
   \ (hasher)
 7 / Box
   \ (box)
 8 / Cache a remote
   \ (cache)
 9 / Citrix Sharefile
   \ (sharefile)
10 / Combine several remotes into one
   \ (combine)
11 / Compress a remote
   \ (compress)
12 / Dropbox
   \ (dropbox)
13 / Encrypt/Decrypt a remote
   \ (crypt)
14 / Enterprise File Fabric
   \ (filefabric)
15 / FTP
   \ (ftp)
16 / Google Cloud Storage (this is not Google Drive)
   \ (google cloud storage)
17 / Google Drive
   \ (drive)
18 / Google Photos
   \ (google photos)
19 / HTTP
   \ (http)
20 / Hadoop distributed file system
   \ (hdfs)
21 / HiDrive
   \ (hidrive)
22 / ImageKit.io
   \ (imagekit)
23 / In memory object storage system.
   \ (memory)
24 / Internet Archive
   \ (internetarchive)
25 / Jottacloud
   \ (jottacloud)
26 / Koofr, Digi Storage and other Koofr-compatible storage providers
   \ (koofr)
27 / Linkbox
   \ (linkbox)
28 / Local Disk
   \ (local)
29 / Mail.ru Cloud
   \ (mailru)
30 / Mega
   \ (mega)
31 / Microsoft Azure Blob Storage
   \ (azureblob)
32 / Microsoft Azure Files
   \ (azurefiles)
33 / Microsoft OneDrive
   \ (onedrive)
34 / OpenDrive
   \ (opendrive)
35 / OpenStack Swift (Rackspace Cloud Files, Blomp Cloud Storage, Memset Memstore, OVH)
   \ (swift)
36 / Oracle Cloud Infrastructure Object Storage
   \ (oracleobjectstorage)
37 / Pcloud
   \ (pcloud)
38 / PikPak
   \ (pikpak)
39 / Proton Drive
   \ (protondrive)
40 / Put.io
   \ (putio)
41 / QingCloud Object Storage
   \ (qingstor)
42 / Quatrix by Maytech
   \ (quatrix)
43 / SMB / CIFS
   \ (smb)
44 / SSH/SFTP
   \ (sftp)
45 / Sia Decentralized Cloud
   \ (sia)
46 / Storj Decentralized Cloud Storage
   \ (storj)
47 / Sugarsync
   \ (sugarsync)
48 / Transparently chunk/split large files
   \ (chunker)
49 / Union merges the contents of several upstream fs
   \ (union)
50 / Uptobox
   \ (uptobox)
51 / WebDAV
   \ (webdav)
52 / Yandex Disk
   \ (yandex)
53 / Zoho
   \ (zoho)
54 / premiumize.me
   \ (premiumizeme)
55 / seafile
   \ (seafile)
Storage> 33

Option client_id.
OAuth Client Id.
Leave blank normally.
Enter a value. Press Enter to leave empty.
client_id> 

Option client_secret.
OAuth Client Secret.
Leave blank normally.
Enter a value. Press Enter to leave empty.
client_secret> 

Option region.
Choose national cloud region for OneDrive.
Choose a number from below, or type in your own string value.
Press Enter for the default (global).
 1 / Microsoft Cloud Global
   \ (global)
 2 / Microsoft Cloud for US Government
   \ (us)
 3 / Microsoft Cloud Germany
   \ (de)
 4 / Azure and Office 365 operated by Vnet Group in China
   \ (cn)
region> 1

Edit advanced config?
y) Yes
n) No (default)
y/n> 

Use web browser to automatically authenticate rclone with remote?
 * Say Y if the machine running rclone has a web browser you can use
 * Say N if running rclone on a (remote) machine without web browser access
If not sure try Y. If Y failed, try N.

y) Yes (default)
n) No
y/n> n

Option config_token.
For this to work, you will need rclone available on a machine that has
a web browser available.
For more help and alternate methods see: https://rclone.org/remote_setup/
Execute the following on the machine with the web browser (same rclone
version recommended):
        rclone authorize "onedrive" "eyJkZXNjcmlwdGlvbiI6IiJ9"
Then paste the result.
Enter a value.
config_token> {"access_token":"eyJ0eXA这里填入那堆token,要带两边的花括号t3kBT6gZn00Y","expiry":"2024-06-12T17:59:42.4784099+08:00"}
Option config_type.
Type of connection
Choose a number from below, or type in an existing string value.
Press Enter for the default (onedrive).
 1 / OneDrive Personal or Business
   \ (onedrive)
 2 / Root Sharepoint site
   \ (sharepoint)
   / Sharepoint site name or URL
 3 | E.g. mysite or https://contoso.sharepoint.com/sites/mysite
   \ (url)
 4 / Search for a Sharepoint site
   \ (search)
 5 / Type in driveID (advanced)
   \ (driveid)
 6 / Type in SiteID (advanced)
   \ (siteid)
   / Sharepoint server-relative path (advanced)
 7 | E.g. /teams/hr
   \ (path)
config_type> 1

Option config_driveid.
Select drive you want to use
Choose a number from below, or type in your own string value.
Press Enter for the default (b!巴拉巴拉巴拉巴拉FkDdClz).
 1 / OneDrive (business)
   \ (b!tdoTpA0qS巴拉巴拉巴拉巴拉Jyh9FkDdClz)
config_driveid> 1

Drive OK?

Found drive "root" of type "business"
URL: https://巴拉巴拉巴拉巴拉-my.sharepoint.com/personal/巴拉巴拉巴拉巴拉i_巴拉巴拉巴拉巴拉crosoft_com/Documents

y) Yes (default)
n) No
y/n> 

Configuration complete.
Options:
- type: onedrive
- token: {"access_token":"就是之前那堆东西T6gZn00Y","expiry":"2024-06-12T17:59:42.4784099+08:00"}
- drive_id: b!t巴拉巴拉巴拉巴拉SUWQj巴拉巴拉巴拉巴拉巴拉巴拉SJyh9FkDdClz
- drive_type: business
Keep this "od" remote?
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d> 

Current remotes:

Name                 Type
====                 ====
od                   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

退出

root@巴拉巴拉巴拉巴拉:~# mkdir /data/onedrive
root@巴拉巴拉巴拉巴拉:~# rclone mount od:/ /data/onedrive --copy-links --no-gzip-encoding --no-check-certificate --allow-other --allow-non-empty --umask 000 --daemon
root@巴拉巴拉巴拉巴拉:~# cd /data/onedrive
root@巴拉巴拉巴拉巴拉:/data/onedrive# ls
应该就能看到e5里面的文件了

标签:remote,rclone,巴拉巴,Storage,onedrive,202406,type,Cloud
From: https://www.cnblogs.com/bennylitech/p/18244374

相关文章

  • [20240607]PL/SQL中sql语句的注解.txt
    [20240607]PL/SQL中sql语句的注解.txt--//别人测试遇到的问题,重复测试说明问题.1.环境:SCOTT@test01p>@verBANNER                                                                           ......
  • [20240601]简单探究free list chunk size的分布.txt
    [20240601]简单探究freelistchunksize的分布.txt--//前几天探究探究freelist,无意中发现12c版本freelistchunksize的发生了变化.单独另外写一篇blog.--//我开始分析以为脚本执行有问题,仔细查看12c版本freelistchunksize分布发生了变化.--//我找了以前的11g下的转储,发......
  • [20240604]简单探究RESERVED FREE LISTS chunk size的分布.txt
    [20240604]简单探究RESERVEDFREELISTSchunksize的分布.txt--//前几天探究探究freelist,无意中发现12c版本freelistchunksize的发生了变化.单独另外写一篇blog.--//我开始分析以为脚本执行有问题,仔细查看12c版本freelistchunksize分布发生了变化.--//我找了以前的11g下......
  • 【安装笔记-20240608-Linux-动态域名更新服务之YDNS】
    安装笔记-系列文章目录安装笔记-20240608-Linux-动态域名更新服务之YDNS文章目录安装笔记-系列文章目录安装笔记-20240608-Linux-动态域名更新服务之YDNS前言一、软件介绍名称:YDNS主页官方介绍二、安装步骤测试版本:openwrt-23.05.3-x86-64注册填写子域名激活邮箱更......
  • 20240609训练
    商品打包(pack)题面:有\(n\)个商品,第\(i\)个商品的体积为\(a_i\),若干个质量为\(L\)的背包。令\(f_i\)为将第\(i\)个商品到第\(n\)个商品依次按如下的方式放入背包中所需要的最少背包数。将第\(k\)商品放入背包的方法为,如果当前背包剩余容量\(\gek\)那么放入,否则加入新背包。题......
  • 简单再谈谈java中的类和接口 20240609
    当我们谈论Java中的类和接口时,我们实际上是在讨论面向对象编程(Object-OrientedProgramming,OOP)的核心概念。OOP是一种编程范式,它将程序视为一组对象的集合,这些对象可以相互交互,通过消息传递来处理数据。让我们从头开始慢慢介绍。类(Class)在Java中,一个类是对象的蓝图或模板。它描......
  • 【教学类-40-01】20240607类似MJ的免费AI绘画工具——文心一格与通义万相
    背景需求:风变的AI对话大师一年到期了,也没有看到续费的按钮。不能使用它写代码了。MJ早就用完了,最后480次,我担心信息课题会用到它生图,所以不敢用。最近探索其他类似MJ的免费出图工具一、文心一格(免费,开账户给100分,每天做任务给16分,可以生成3张)用一次8分每天做任......
  • 好久没来了-20240607
    【今天又是什么日子】今天是2024年6月7日,星期五,其实也没有很特别只不过刚好是今年高考的第一天,写这个的时候上午的考试应该完了高考很重要,每一天都很重要年轻很好,每一天也很好且行且珍惜【上次来是什么时候】上次来还是上个月月中的时候,准备跳槽来着【为啥突然记得来了】......
  • 【调试笔记-20240601-Linux-在 OpenWRT-23.05 上配置 frpc 实现内网穿透】
    调试笔记-系列文章目录调试笔记-20240601-Linux-在OpenWRT-23.05上配置frpc实现内网穿透文章目录调试笔记-系列文章目录调试笔记-20240601-Linux-在OpenWRT-23.05上配置frpc实现内网穿透前言一、调试环境操作系统:OpenWrt23.05.3调试环境调试目标二、调试步......
  • 【教学类-13-05】20240604《数字色块图-5*7*8-A4横板-横切》中4班
    背景需求:【教学类-13-04】20230404《数字色块图+判断密码是否正确-5*7*8-A4横板-横切》(中班主题《我爱我家》)_图案密码色块-CSDN博客文章浏览阅读530次。【教学类-13-04】20230404《数字色块图+判断密码是否正确-5*7*8-A4横板-横切》(中班主题《我爱我家》)_图案密码色块......