今天进度不错,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这个文件
五,官文关于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.
网友评论