共计 2570 个字符,预计需要花费 7 分钟才能阅读完成。
这不一大早醒来发现 OneDrive 的文件全变成只读
这时大家肯定想到用 https://mover.io/ rclone api 等方法挂载 OneDrive 来转移文件 但是大部分人的账号出现只读后不能使用这二个工具
但是 Webdav 应该都可以用吧 我的账号出现只读后还是可以用 Webdav 的
这时 我们只需要准备一台 Azure 的机器安装上 Rclone Webdav 来对拷即可
机器配置 1H2G 即可 硬盘选 64G 默认 30G 应该也够用 无需太高 实测这个配置完全够用
Rclone Webdav 配置文件如下
#挂载 OneDrive 为 Webdav 适用于无 api 及只读状态
1、新建配置文件
rclone config
选择 WebDAV
输入:https://cxxx-my.sharepoint.com/personal/xy-n_mxxxx_org/Documents
root@Test1:/usr/sju/sh# rclone config #新建配置文件
Current remotes:
Name Type
==== ====
cxxx_backup onedrive
sharepoint webdav
xy-23-02 webdav
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
Enter name for new remote.
name> xy-n #填写配置文件名称
Option Storage.
Type of storage to configure.
Choose a number from below, or type in your own value.
46 / WebDAV
\ (webdav)
47 / Yandex Disk
\ (yandex)
48 / Zoho
\ (zoho)
49 / premiumize.me
\ (premiumizeme)
50 / seafile
\ (seafile)
Storage> 46 #选择挂载类型 WebDAV
Option url.
URL of http host to connect to.
E.g. https://example.com.
Enter a value.
url> https://cxxx-my.sharepoint.com/personal/xy-n_mxxxx_org/Documents #填写 url
Option vendor.
Name of the WebDAV site/service/software you are using.
Choose a number from below, or type in your own value.
Press Enter to leave empty.
1 / Nextcloud
\ (nextcloud)
2 / Owncloud
\ (owncloud)
3 / Sharepoint Online, authenticated by Microsoft account
\ (sharepoint)
4 / Sharepoint with NTLM authentication, usually self-hosted or on-premises
\ (sharepoint-ntlm)
5 / Other site/service or software
\ (other)
vendor> 4 #OneDrive 选择 Sharepoint
Option user.
User name.
In case NTLM authentication is used, the username should be in the format 'Domain\User'.
Enter a value. Press Enter to leave empty.
user> xy-n@mxxxx.org #输入 OneDrive 账号
Option pass.
Password.
Choose an alternative below. Press Enter for the default (n).
y) Yes, type in my own password
g) Generate random password
n) No, leave this optional password blank (default)
y/g/n> y #选 y 输入 OneDrive 的密码
Enter the password:
password: #输入密码 盲打 屏幕不显示
Confirm the password:
password:
Option bearer_token.
Bearer token instead of user/pass (e.g. a Macaroon).
Enter a value. Press Enter to leave empty.
bearer_token> #按回车 默认即可
Edit advanced config?
y) Yes
n) No (default)
y/n> n #按 n 不进行高级配置
Configuration complete.
Options:
- type: webdav
- url: https://cxxx-my.sharepoint.com/personal/xy-n_mxxxx_org/Documents
- vendor: sharepoint-ntlm
- user: xy-n@mxxxx.org
- pass: *** ENCRYPTED ***
Keep this "xy-n" remote?
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d> y #确认配置文件 确认无误按 y 即可
Current remotes:
Name Type
==== ====
cxxx_backup onedrive
sharepoint webdav
xy-23-02 webdav
xy-n webdav
#这是刚创建的配置文件 不能直接用 需要手动修改 vendor 的值为 sharepoint 默认创建好的是 sharepoint-ntlm
[xy-n]
type = webdav
url = https://cxxx-my.sharepoint.com/personal/xy-n_mxxxx_org/Documents
vendor = sharepoint
user = xy-n@mxxxx.org
pass = xxxxxxxx
-
注意哈 不能直接复制配置文件 pass 必须是加密后的 明文密码挂载会报错
正文完