RCLONE 使用说明手册
1、安装
1.1 安装包下载地址
官网下载地址
https://rclone.org/downloads/
linux 离线安装
1.2 放入/opt/rclone 目录下
unzip 解压
unzip rclone-v1.61.1-linux-amd64.zip
得到如下文件
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-fhnJTPPN-1682578552961)(image-20230224153847997.png)]
1.3 使用软链接
ln -s /opt/rclone/rclone-v1.61.1-linux-amd64/rclone /usr/bin/rclone
2、配置
进入 如下目录进行配置
vim /root/.config/rclone/rclone.conf
配置如下:
[minio-1]
type = s3
provider = Minio
env_auth = false
access_key_id = minio
secret_access_key = minio123
region = cn-east-1
endpoint = http://192.168.10.105:9000
[minio-2]
type = s3
provider = Minio
env_auth = false
access_key_id = minio
secret_access_key = minio123
region = cn-east-1
endpoint = http://192.168.10.103:9000
配置说明:
type 使用的是亚马逊 S3 接口
provider 提供厂商配置是MinIO
access_key_id 和 secret_access_key 为登录用户和登录密码
region 使用地区为cn-east-1 中国地区
endpoint 是MinIO 接口地址
3、使用说明
在配置rclone的节点使用如下命令,进行数据备份操作
全量同步:
rclone sync minio-1:test minio-2:test
命令说明:
sync 表示同步命令 minio-1为配置文件头 minio-2同理 test分别是所在节点对应的minio的桶名
增量同步:
rclone sync minio-1:test minio-2:test --checksum
–checksum #使用md5判断文件是否需要重新同步,即增量备份
推荐使用这个进行增量数据备份
rclone sync minio-1:test minio-2:test --transfers=8 --update --use-server-modtime --checksum
其他命令说明
rclone config - Enter an interactive configuration session.
rclone copy - Copy files from source to dest, skipping already copied.
rclone sync - Make source and dest identical, modifying destination only.
rclone bisync - Bidirectional synchronization between two paths.
rclone move - Move files from source to dest.
rclone delete - Remove the contents of path.
rclone purge - Remove the path and all of its contents.
rclone mkdir - Make the path if it doesn't already exist.
rclone rmdir - Remove the path.
rclone rmdirs - Remove any empty directories under the path.
rclone check - Check if the files in the source and destination match.
rclone ls - List all the objects in the path with size and path.
rclone lsd - List all directories/containers/buckets in the path.
rclone lsl - List all the objects in the path with size, modification time and path.
rclone md5sum - Produce an md5sum file for all the objects in the path.
rclone sha1sum - Produce a sha1sum file for all the objects in the path.
rclone size - Return the total size and number of objects in remote:path.
rclone version - Show the version number.
rclone cleanup - Clean up the remote if possible.
rclone dedupe - Interactively find duplicate files and delete/rename them.
rclone authorize - Remote authorization.
rclone cat - Concatenate any files and send them to stdout.
rclone copyto - Copy files from source to dest, skipping already copied.
rclone genautocomplete - Output shell completion scripts for rclone.
rclone gendocs - Output markdown docs for rclone to the directory supplied.
rclone listremotes - List all the remotes in the config file.
rclone mount - Mount the remote as a mountpoint.
rclone moveto - Move file or directory from source to dest.
rclone obscure - Obscure password for use in the rclone.conf
rclone cryptcheck - Check the integrity of an encrypted remote.
rclone about - Get quota information from the remo
– config
查看现在使用的密码
–copy
测试显示copy 和 sync 效果差异很小
rclone copy minio-1:test minio-2:test --checksum
但是copy 不会传输文件 源和目标相同,按大小和修改进行测试 时间或 MD5SUM ,通俗说修改的不会copy。推荐使用sync
–sync
始终同步的是目录内容
rclone sync minio-1:test minio-2:test --checksum
如果 源 上的文件删除 同理 目标上的文件 在经过sync 后也会删除,如果不想出现这种情况,使用copy
–bisync
双向同步
rclone bisync minio-1:test minio-2:test
–move
不建议使用
将源目录的内容移动到目标目录 目录。如果源和目标重叠,Rclone 将出错,并且 远程数据库不支持服务器端目录移动操作。
–ls
查看 列出路径中的所有对象,包括大小和路径。
4、注意事项
暂时没想到
-2:test
--move
不建议使用
将源目录的内容移动到目标目录 目录。如果源和目标重叠,Rclone 将出错,并且 远程数据库不支持服务器端目录移动操作。
--ls
查看 列出路径中的所有对象,包括大小和路径。
### 4、注意事项
暂时没想到