Centos-7安装Rclone如何用命令同步国外网盘文件?

技术教程 2026-01-08 13:47:53 浏览

国内网盘都是不靠谱的,瞎耽误功夫;除了115网盘我觉得其它都是渣渣,可它价格忒贵,而且能存活多久也是个问题;如果要存放重要资料个人觉得还是国外网盘靠谱得多,虽然免费容量有限扩容收费,但图的就是个安全有保障,数据无价!

Rclone这是Github上的一个开源程序,负责在linux服务器中上传下载同步国外主流网盘用的神器;支持以下国外网盘Google Drive、Amazon S3、Openstack Swift / Rackspace cloud Files / Memset Memstore、Dropbox、Google Cloud Storage、Amazon Drive、Microsoft One Drive、Hubic、Backblaze B2、Yandex Disk、The local filesystem;

下午我在内地家里使用局域网中的一台安装了centos 7系统的服务器,运行Rclone命令上传下载了一些谷歌硬盘上的文件测试,效果灰常灰常理想,下面是我安装的记录日记;

网友们放弃国内不靠谱的坑爹网盘吧,用国外的网盘爽得多,不会动不动就卡得跟狗一样限速,不会动不动就和谐文件、也不会动不动就不玩了跑路,重点是速度速度速度快;

curl -O

yum install unzip -y

unzip rclone-current-linux-amd64.zip

cd rclone-v1.35-linux-amd64

cp rclone /usr/sbin/

chown root:root /usr/sbin/rclone

chmod 755 /usr/sbin/rclone

mkdir -p /usr/local/share/man/man1

cp rclone.1 /usr/local/share/man/man1/

rclone config

2017/03/02 14:25:41 Config file "/root/.rclone.conf" not found - using defaults

No REMOTEs found - make a new one

n) New remote

s) Set configuration password

q) Quit config

选择N创建一个新的配置

name> googledrive

给配置取一个名字,这个随意,我选择了googledrive

Type of storage to configure.

Choose a number from below, or type in your own value

1 / Amazon Drive

\ "amazon cloud drive"

Centos

2 / Amazon S3 (also Dreamhost, Ceph, Minio)

3 / Backblaze B2

\ "dropbox"

5 / Encrypt/Decrypt a remote

6 / Google Cloud Storage (this is not Google Drive)

\ "google cloud storage"

7 / Google Drive

9 / Local Disk

10 / Microsoft OneDrive

\ "onedrive"

11 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH)

12 / Yandex Disk

Rclone支持很多国外主流网盘,我选择谷歌硬盘所以回复7

以下两条返回信息直接回车不用填写信息

Google Application Client Id - leave blank normally.

client_id>

Google Application Client Secret - leave blank normally.

client_secret>

下面提示代码回复n

Remote config

Use auto config?

* Say Y if not sure

* Say N if you are working on a remote or headless machine or Y didn't work

把下面的网址授权链接复制粘贴到浏览器进行认证

If your browser doesn't open automatically go to the following

link:

Log in and authorize rclone for access

Enter verification code>

认证成功后会得到一串数字将它粘贴到Enter verification code>后面回车确认

Enter verification code>

4/oCKeWj4v6tnl9jfdkfjdsk3q8emfxRuZ5HEn49pJ740KJk

下面的返回信息继续问你是否确认刚才得到的信息选择y

[googledrive]

client_id =

client_secret =

token = {"access_token":"ya29.GlsCBKS2rJqd_YuroyWklklklklklklSPPISs58WMJCm54DauJ_QeZudvKTTUOZ4fS09mt5wqcAggfdgdfmAqojdaTTJv-ukAoC_q0lgdfgfdtSv4yn_yEtaEtG","token_type":"Bearer","refresh_token":"1/5Tv8KqnjWb_oTtO7QDm2umcRQgfgfdgdfgfKMJIOC7dkU","expiry":"2017-03-02T15:42:10.847395882+08:00"}

y) Yes this is OK

e) Edit this remote

d) Delete this remote

下面返回信息回复q退出配置

Current remotes:

googledrive drive

e) Edit existing remote

n) New remote

d) Delete remote

s) Set configuration password

q) Quit config

e/n/d/s/q> q

本文版权声明本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,请联系本站客服,一经查实,本站将立刻删除。

发表评论

热门推荐