【快捷部署】001-Rclone(v1.64.2)

部署信息

编号选型版本操作系统部署模式部署形式
001Rclone1.64.2Centos7.X单机部署rmp

安装Rclone

# 创建安装路径
mkdir /usr/local/rclone

#进入路径
cd /usr/local/rclone

#下载安装包
wget https://downloads.rclone.org/v1.64.2/rclone-v1.64.2-linux-amd64.rpm

#安装Rclone
rpm -ivh rclone-v1.64.2-linux-amd64.rpm

创建远程连接对象

按黄色提示操作

rclone config

2024/07/11 18:12:23 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/s/q> n

Enter name for new remote.

name> remote自定义一个对端服务的别名

Option Storage.

Type of storage to configure.

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

 1 / 1Fichier

   \ (fichier)

 2 / Akamai NetStorage

   \ (netstorage)

 3 / Alias for an existing remote

   \ (alias)

 4 / Amazon Drive

   \ (amazon cloud drive)

 5 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, ArvanCloud, Ceph, China Mobile, Cloudflare, GCS, DigitalOcean, Dreamhost, Huawei OBS, IBM COS, IDrive e2, IONOS Cloud, Leviia, Liara, Lyve Cloud, Minio, Netease, Petabox, RackCorp, Scaleway, SeaweedFS, StackPath, Storj, Synology, Tencent COS, Qiniu and Wasabi

   \ (s3)

 6 / Backblaze B2

   \ (b2)

 7 / Better checksums for other remotes

   \ (hasher)

 8 / Box

   \ (box)

 9 / Cache a remote

   \ (cache)

10 / Citrix Sharefile

   \ (sharefile)

11 / Combine several remotes into one

   \ (combine)

12 / Compress a remote

   \ (compress)

13 / Dropbox

   \ (dropbox)

14 / Encrypt/Decrypt a remote

   \ (crypt)

15 / Enterprise File Fabric

   \ (filefabric)

16 / FTP

   \ (ftp)

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

   \ (google cloud storage)

18 / Google Drive

   \ (drive)

19 / Google Photos

   \ (google photos)

20 / HTTP

   \ (http)

21 / Hadoop distributed file system

   \ (hdfs)

22 / HiDrive

   \ (hidrive)

23 / In memory object storage system.

   \ (memory)

24 / Internet Archive

   \ (internetarchive)

25 / Jottacloud

   \ (jottacloud)

26 / Koofr, Digi Storage and other Koofr-compatible storage providers

   \ (koofr)

27 / Local Disk

   \ (local)

28 / Mail.ru Cloud

   \ (mailru)

29 / Mega

   \ (mega)

30 / Microsoft Azure Blob Storage

   \ (azureblob)

31 / Microsoft OneDrive

   \ (onedrive)

32 / OpenDrive

   \ (opendrive)

33 / OpenStack Swift (Rackspace Cloud Files, Blomp Cloud Storage, Memset Memstore, OVH)

   \ (swift)

34 / Oracle Cloud Infrastructure Object Storage

   \ (oracleobjectstorage)

35 / Pcloud

   \ (pcloud)

36 / PikPak

   \ (pikpak)

37 / Proton Drive

   \ (protondrive)

38 / Put.io

   \ (putio)

39 / QingCloud Object Storage

   \ (qingstor)

40 / Quatrix by Maytech

   \ (quatrix)

41 / SMB / CIFS

   \ (smb)

42 / SSH/SFTP

   \ (sftp)

43 / Sia Decentralized Cloud

   \ (sia)

44 / Storj Decentralized Cloud Storage

   \ (storj)

45 / Sugarsync

   \ (sugarsync)

46 / Transparently chunk/split large files

   \ (chunker)

47 / Union merges the contents of several upstream fs

   \ (union)

48 / Uptobox

   \ (uptobox)

49 / WebDAV

   \ (webdav)

50 / Yandex Disk

   \ (yandex)

51 / Zoho

   \ (zoho)

52 / premiumize.me

   \ (premiumizeme)

53 / seafile

   \ (seafile)

Storage> 42

Option host.

SSH host to connect to.

E.g. "example.com".

Enter a value.

host> {要连接的ip}

Option user.

SSH username.

Enter a string value. Press Enter for the default (root).

user> root

Option port.

SSH port number.

Enter a signed integer. Press Enter for the default (22).

port> 22

Option pass.

SSH password, leave blank to use ssh-agent.

Choose an alternative below. Press Enter for the default (n).

y) Yes, type in my own password

g) Generate random password

n) No, leave this optional password blank (default)

y/g/n> y

Enter the password:

password:{要连接服务的登录密码}

Confirm the password:

password:{要连接服务的登录密码}

Option key_pem.

Raw PEM-encoded private key.

If specified, will override key_file parameter.

Enter a value. Press Enter to leave empty.

key_pem> {直接回车}

Option key_file.

Path to PEM-encoded private key file.

Leave blank or set key-use-agent to use ssh-agent.

Leading `~` will be expanded in the file name as will environment variables such as `${RCLONE_CONFIG_DIR}`.

Enter a value. Press Enter to leave empty.

key_file> {直接回车}

Option key_file_pass.

The passphrase to decrypt the PEM-encoded private key file.

Only PEM encrypted key files (old OpenSSH format) are supported. Encrypted keys

in the new OpenSSH format can't be used.

Choose an alternative below. Press Enter for the default (n).

y) Yes, type in my own password

g) Generate random password

n) No, leave this optional password blank (default)

y/g/n> n

Option pubkey_file.

Optional path to public key file.

Set this if you have a signed certificate you want to use for authentication.

Leading `~` will be expanded in the file name as will environment variables such as `${RCLONE_CONFIG_DIR}`.

Enter a value. Press Enter to leave empty.

pubkey_file> {直接回车}

Option key_use_agent.

When set forces the usage of the ssh-agent.

When key-file is also set, the ".pub" file of the specified key-file is read and only the associated key is

requested from the ssh-agent. This allows to avoid `Too many authentication failures for *username*` errors

when the ssh-agent contains many keys.

Enter a boolean value (true or false). Press Enter for the default (false).

key_use_agent> {直接回车}

Option use_insecure_cipher.

Enable the use of insecure ciphers and key exchange methods.

This enables the use of the following insecure ciphers and key exchange methods:

- aes128-cbc

- aes192-cbc

- aes256-cbc

- 3des-cbc

- diffie-hellman-group-exchange-sha256

- diffie-hellman-group-exchange-sha1

Those algorithms are insecure and may allow plaintext data to be recovered by an attacker.

This must be false if you use either ciphers or key_exchange advanced options.

Choose a number from below, or type in your own boolean value (true or false).

Press Enter for the default (false).

 1 / Use default Cipher list.

   \ (false)

 2 / Enables the use of the aes128-cbc cipher and diffie-hellman-group-exchange-sha256, diffie-hellman-group-exchange-sha1 key exchange.

   \ (true)

use_insecure_cipher>

Option disable_hashcheck.

Disable the execution of SSH commands to determine if remote file hashing is available.

Leave blank or set to false to enable hashing (recommended), set to true to disable hashing.

Enter a boolean value (true or false). Press Enter for the default (false).

disable_hashcheck> {直接回车}

Option ssh.

Path and arguments to external ssh binary.

Normally rclone will use its internal ssh library to connect to the

SFTP server. However it does not implement all possible ssh options so

it may be desirable to use an external ssh binary.

Rclone ignores all the internal config if you use this option and

expects you to configure the ssh binary with the user/host/port and

any other options you need.

**Important** The ssh command must log in without asking for a

password so needs to be configured with keys or certificates.

Rclone will run the command supplied either with the additional

arguments "-s sftp" to access the SFTP subsystem or with commands such

as "md5sum /path/to/file" appended to read checksums.

Any arguments with spaces in should be surrounded by "double quotes".

An example setting might be:

    ssh -o ServerAliveInterval=20 user@example.com

Note that when using an external ssh binary rclone makes a new ssh

connection for every hash it calculates.

Enter a fs.SpaceSepList value. Press Enter to leave empty.

ssh> {直接回车}

Edit advanced config?

y) Yes

n) No (default)

y/n> n

Configuration complete.

Options:

- type: sftp

- host: 192.168.1.165

- pass: *** ENCRYPTED ***

Keep this "remote" remote?

y) Yes this is OK (default)

e) Edit this remote

d) Delete this remote

y/e/d> y

Current remotes:

Name                 Type

====                 ====

remote               sftp

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> q

创建完成!

# 查看rclone的对端信息

cat /root/.config/rclone/rclone.conf

Rclone的使用

假定对端服务器的/usr/local/file1,迁移到当前服务器/usr/local/file2

# 一般迁移

rclone sync remote:/usr/local/file1/ /usr/local/file2/ -P --transfers 32 --checkers 64

# 限速迁移

rclone sync remote:/usr/local/file1/ /usr/local/file2/ -P --transfers 32 --checkers 64  --bwlimit 5M

# 静默迁移

$ nohup  rclone sync remote:/usr/local/file1/ /usr/local/file2/ -P --transfers 32 --checkers 64 >>/usr/local/output.log 2>&1 &

# 过滤迁移,如迁移2024-07-08这天的数据

rclone sync remote:/usr/local/file1/ /usr/local/file2/ -P --transfers 32 --checkers 64 --min-age 2024-07-09 --max-age 2024-07-08

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值