美文网首页
使用rclone同步minio和本地的文件

使用rclone同步minio和本地的文件

作者: 万州客 | 来源:发表于2021-01-14 09:57 被阅读0次

今天进度不错,minio,mc,rclone一次搞定。前两者,见我在知乎的专栏,这里专讲rclone。

rclone官网:
https://rclone.org/
rclone文档:
https://rclone.org/docs/

一,rclone下载安装:

https://rclone.org/downloads/
解压之后,将rclone可执行文件cp到/usr/local/bin目录下即可。

二,rclone config

最先,要运行此命令,生成的config文件如下:

[minio]
type = s3
provider = Minio
env_auth = false
access_key_id = minioadmin
secret_access_key = minioadmin
endpoint = http://192.168.1.213:9000

三,将文件从远程copy到本地

rclone copy minio:/aguncn/anaconda-ks.cfg /tmp
/tmp/目录下,即有anaconda-ks.cfg主件

四,将文件从本地copy到远程

rclone copy /tmp/ minio:/sky
minio的sky这个bucket下,即会有anaconda-ks.cfg这个文件

2021-01-13 22_06_10-画图 3D.png

五,官文关于copy single file的说明

Copying single files

  • rclone normally syncs or copies directories. However, if the source remote points to a file, rclone will just copy that file. The destination remote must point to a directory - rclone will give the error Failed to create file system for "remote:file": is a file not a directory if it isn't.

For example, suppose you have a remote with a file in called test.jpg, then you could copy just that file like this

rclone copy remote:test.jpg /tmp/download
The file test.jpg will be placed inside /tmp/download.

This is equivalent to specifying

rclone copy --files-from /tmp/files remote: /tmp/download
Where /tmp/files contains the single line

test.jpg
It is recommended to use copy when copying individual files, not sync. They have pretty much the same effect but copy will use a lot less memory.

相关文章

网友评论

      本文标题:使用rclone同步minio和本地的文件

      本文链接:https://www.haomeiwen.com/subject/nqnpaktx.html