一.前言
这是一篇简单介绍Rclone用法的文章,只介绍关于转存文件的功能,不谈其他。
维咔还有一篇详细介绍Rclone的文章:
二.Rclone的下载与安装
(一).Windows系统
1.下载:Rclone downloads
根据架构以及系统下载对应的版本即可
2.安装
直接解压压缩包即可
(二).Linux系统
1.下载和配置(命令行)
curl -O https://github.com/rclone/rclone/releases/download/v1.65.0/rclone-v1.65.0-linux-amd64.zip
unzip rclone-v1.65.0-linux-amd64.zip
cd rclone-v1.65.0-linux-amd64
sudo cp rclone /usr/bin/
sudo chown root:root /usr/bin/rclone
sudo chmod 755 /usr/bin/rclone
2.检查配置是否生效
执行”rclone version”,显示rclone的版本号即为成功。
三.Rclone添加OD盘
(一).window系统与Linux系统操作上的区别
1.Windows系统,运行程序前,需要进入工作文件夹。而Linux不需要。
2.Windows系统,运行程序,前面要加上“.\”,后面需要输入完整的文件名。如下所示:
.\rclone.exe
而Linux系统不需要,如下所示:
rclone
(二).具体步骤(以Linux为例)
执行
rclone config
结果为:
2023/12/06 21:11:04 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”。
结果为:
Enter name for new remote.
name>
输入一个名称,例如”OD-1″。
结果为:
Option Storage.
Type of storage to configure.
Choose a number from below, or type in your own value.
1 / 1Fichier
\ (fichier)
......
Storage>
这一步为选择云盘,1.65.0版本的Rclone,Onedrive在34。
那么这一步,我们输入”34″。
结果为:
Option client_id.
OAuth Client Id.
Leave blank normally.
Enter a value. Press Enter to leave empty.
client_id>
从这一步开始,后面的一直按回车,直到弹出网页,登录OD账号,此时命令行应该显示:
2023/12/06 21:20:47 NOTICE: If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=v5*******xYUB*****g4zg
2023/12/06 21:20:47 NOTICE: Log in and authorize rclone for access
2023/12/06 21:20:47 NOTICE: Waiting for code...
网页登录账号以后,会显示“Success!”,此时命令行应该显示:
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)
......
config_type>
之后继续一直按回车,直到OD盘添加完成,此时命令行应该显示:
Current remotes:
Name Type
==== ====
OD-1 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>
到这,添加一个OD盘的操作就完成了。
四.Rclone复制
这一步建议去看这篇文章Notes/利用Rclone在VPS上转存网盘文件.md at main · haicker/Notes (github.com)
五.尾言
1.Rclone软件复制文件的原理,差不多还是一边下载一边上传。而高宽带的服务器一般来说会很贵,所以建议本地进行复制文件的操作。
2.我之前完全没用过Rclone软件。也是机缘巧合,才会去了解这个软件,教程也都是网上找的。所以,遇到问题请优先用搜索引擎解决。
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得UP主同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理:DMCA投诉/Report
如果还觉得很复杂,我可以再写一点更简单的
继续保持填坑
Rclone用不太明白,一直自己手动sync sync sync巨麻烦,双向sync还在beta也没太敢用。感觉没有Linux的onedrive client用的爽呀,可以定时两边同步