apt install rclone
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
下列软件包是自动安装的并且现在不需要了:
golang-1.18-go golang-1.18-src golang-src
使用'apt autoremove'来卸载它(它们)。
下列【新】软件包将被安装:
rclone
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 85 个软件包未被升级。
需要下载 11.7 MB 的归档。
解压缩后会消耗 42.6 MB 的额外空间。
获取:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy-updates/universe amd64 rclone amd64 1.53.3-4ubuntu1.22.04.2 [11.7 MB]
已下载 11.7 MB,耗时 9秒 (1,232 kB/s)
正在选中未选择的软件包 rclone。
(正在读取数据库 ... 系统当前共安装有 288973 个文件和目录。)
准备解压 .../rclone_1.53.3-4ubuntu1.22.04.2_amd64.deb ...
正在解压 rclone (1.53.3-4ubuntu1.22.04.2) ...
正在设置 rclone (1.53.3-4ubuntu1.22.04.2) ...
正在处理用于 man-db (2.10.2-1) 的触发器 ...
获取 refresh_token
打开链接 扫码
https://messense-aliyundrive-webdav-backendrefresh-token-ucs0wn.streamlit.app/
获取
或者
本地安装
pip install aliyundrive-webdav
进行扫码
aliyundrive-webdav qr login 14:36:31 ☁ main ☂ ⚡ ✭
▄▄▄▄▄ ▄ ▄▄ ▄▄▄ ▄ ▄▄ ▄▄▄▄▄
▄▄ ▄▄ ▄ ▄▄▄▄ ▄▄ ▄▄▄
▄▄▄ ▄▄▄ ▄▄▄ ▄ ▄▄▄▄ ▄▄▄▄▄ ▄▄▄
▄▄▄▄▄▄▄ ▄▄ ▄▄ ▄▄ ▄ ▄▄▄ ▄ ▄ ▄▄▄▄▄▄▄
▄ ▄ ▄▄▄ ▄ ▄▄ ▄▄▄▄ ▄▄ ▄ ▄ ▄ ▄ ▄▄
▄ ▄▄ ▄▄ ▄▄▄▄ ▄ ▄ ▄▄▄ ▄▄ ▄ ▄ ▄▄▄ ▄
▄▄ ▄▄ ▄▄▄▄▄▄▄ ▄ ▄ ▄▄▄ ▄▄▄ ▄▄▄▄▄ ▄▄
▄▄▄▄▄▄▄ ▄▄▄ ▄▄▄ ▄ ▄▄▄ ▄▄▄▄▄▄▄ ▄▄
▄ ▄▄▄ ▄▄▄ ▄▄ ▄▄ ▄▄ ▄▄▄ ▄▄ ▄▄▄ ▄▄ ▄
▄ ▄ ▄ ▄▄▄▄▄ ▄▄ ▄ ▄▄▄ ▄▄▄ ▄▄ ▄
▄▄▄ ▄ ▄ ▄ ▄ ▄▄ ▄ ▄ ▄ ▄▄▄▄▄ ▄▄ ▄▄▄ ▄▄
▄ ▄▄▄▄▄▄▄ ▄ ▄▄ ▄▄ ▄ ▄ ▄▄ ▄▄▄▄▄▄ ▄▄
▄ ▄▄▄▄ ▄ ▄ ▄▄ ▄▄▄▄▄ ▄▄ ▄▄▄ ▄ ▄▄▄ ▄ ▄▄
▄▄▄▄ ▄▄ ▄▄▄▄▄ ▄ ▄▄▄▄ ▄ ▄▄ ▄▄ ▄▄ ▄ ▄▄
▄ ▄ ▄▄ ▄ ▄ ▄ ▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄ ▄
▄ ▄▄▄ ▄ ▄ ▄ ▄ ▄▄ ▄ ▄ ▄ ▄ ▄ ▄▄ ▄
▄ ▄ ▄▄ ▄▄▄▄ ▄ ▄▄▄▄▄▄▄ ▄ ▄ ▄▄▄ ▄▄
▄▄▄▄▄ ▄▄▄ ▄ ▄ ▄ ▄ ▄ ▄ ▄▄▄ ▄▄ ▄ ▄
▄▄ ▄▄▄▄ ▄▄▄▄▄▄ ▄▄▄ ▄ ▄ ▄
▄▄▄ ▄ ▄ ▄ ▄ ▄ ▄ ▄ ▄ ▄ ▄ ▄▄▄▄ ▄▄
▄▄▄▄▄▄▄ ▄▄▄▄▄ ▄ ▄▄▄ ▄▄ ▄▄▄ ▄▄▄ ▄▄ ▄
2024-09-24T06:36:42.519371Z INFO aliyundrive_webdav: Please scan the qrcode to login in 120 seconds
refresh_token:
xxx
docker 安装 webdav-aliyundriver
将获取的tokan 填入
cat start_aliwebdav.sh
#!/bin/bash
docker run -d --name=aliyundrive-webdav --restart=unless-stopped -p 8998:8080 -v /etc/aliyundrive-webdav/:/etc/aliyundrive-webdav/ -e REFRESH_TOKEN='xxx' -e WEBDAV_AUTH_USER=admin -e WEBDAV_AUTH_PASSWORD=admin messense/aliyundrive-webdav
设置 rclone
#配置过程代码,参考着一步一步来
#name请自行替换
#密码需要输入两遍进行确认,建议上面运行webdav程序的时候不设置密码或使用默认密码
rclone config
2021/08/12 16:28:35 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
name> aliyunwebdav
Type of storage to configure.
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
1 / 1Fichier
\ "fichier"
2 / Alias for an existing remote
\ "alias"
3 / Amazon Drive
\ "amazon cloud drive"
4 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, Digital Ocean, Dreamhost, IBM COS, Minio, SeaweedFS, and Tencent COS
\ "s3"
5 / Backblaze B2
\ "b2"
6 / Box
\ "box"
7 / Cache a remote
\ "cache"
8 / Citrix Sharefile
\ "sharefile"
9 / Compress a remote
\ "compress"
10 / Dropbox
\ "dropbox"
11 / Encrypt/Decrypt a remote
\ "crypt"
12 / Enterprise File Fabric
\ "filefabric"
13 / FTP Connection
\ "ftp"
14 / Google Cloud Storage (this is not Google Drive)
\ "google cloud storage"
15 / Google Drive
\ "drive"
16 / Google Photos
\ "google photos"
17 / Hadoop distributed file system
\ "hdfs"
18 / Hubic
\ "hubic"
19 / In memory object storage system.
\ "memory"
20 / Jottacloud
\ "jottacloud"
21 / Koofr
\ "koofr"
22 / Local Disk
\ "local"
23 / Mail.ru Cloud
\ "mailru"
24 / Mega
\ "mega"
25 / Microsoft Azure Blob Storage
\ "azureblob"
26 / Microsoft OneDrive
\ "onedrive"
27 / OpenDrive
\ "opendrive"
28 / OpenStack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
\ "swift"
29 / Pcloud
\ "pcloud"
30 / Put.io
\ "putio"
31 / QingCloud Object Storage
\ "qingstor"
32 / SSH/SFTP Connection
\ "sftp"
33 / Sugarsync
\ "sugarsync"
34 / Tardigrade Decentralized Cloud Storage
\ "tardigrade"
35 / Transparently chunk/split large files
\ "chunker"
36 / Union merges the contents of several upstream fs
\ "union"
37 / Uptobox
\ "uptobox"
38 / Webdav
\ "webdav"
39 / Yandex Disk
\ "yandex"
40 / Zoho
\ "zoho"
41 / http Connection
\ "http"
42 / premiumize.me
\ "premiumizeme"
43 / seafile
\ "seafile"
Storage> 38
URL of http host to connect to
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
1 / Connect to example.com
\ "https://example.com"
url> http://127.0.0.1:8998
Name of the Webdav site/service/software you are using
Enter a string value. Press Enter for the default ("").
Choose a number from below, or type in your own value
1 / Nextcloud
\ "nextcloud"
2 / Owncloud
\ "owncloud"
3 / Sharepoint Online, authenticated by Microsoft account.
\ "sharepoint"
4 / Sharepoint with NTLM authentication. Usually self-hosted or on-premises.
\ "sharepoint-ntlm"
5 / Other site/service or software
\ "other"
vendor> 5
User name. In case NTLM authentication is used, the username should be in the format 'Domain\User'.
Enter a string value. Press Enter for the default ("").
user> admin
Password.
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:
Bearer token instead of user/pass (e.g. a Macaroon)
Enter a string value. Press Enter for the default ("").
bearer_token>
Edit advanced config?
y) Yes
n) No (default)
y/n>
--------------------
[aliyunwebdav]
type = webdav
url = http://127.0.0.1:8998
vendor = other
user = admin
pass = *** ENCRYPTED ***
--------------------
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d>
Current remotes:
Name Type
==== ====
aliyunwebdav webdav
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
查看是否 成功
root@qk2023:~# rclone lsd yskj_nas:/
-1 2022-09-28 20:06:53 -1 bakkkk
-1 2022-09-08 17:57:00 -1 城南爸爸
本地目录已经有云盘的数据了
上传文件
rclone copy /nas_dirs/flights_files/MU/ yskj_nas:/flights_files/MU/ -P
Transferred: 430.124M / 84.906 GBytes, 0%, 7.390 MBytes/s, ETA 3h15m7s
Checks: 3 / 3, 100%
Transferred: 16 / 4053, 0%
Elapsed time: 58.5s
Transferring:
* MU_202404230216_end.zip:100% /21.773M, 1.361M/s, 0s
* MU_202404230416_end.zip: 48% /21.773M, 1.050M/s, 10s
* MU_202404230516_end.zip:100% /21.773M, 2.419M/s, 0s
* MU_202404230616_end.zip: 58% /21.171M, 0/s, -
请参阅--no-traverse选项来控制rclone是否列出目标目录。 在将少量文件复制到大型目标时提供此选项可以大大加快传输速度。
例如,如果您在/path/to/src中有许多文件,但每天只有少数文件更改,则可以非常有效地复制最近更改的所有文件,如下所示:
rclone copy --max-age 24h --no-traverse /nas_dirs/flights_files/MU/ yskj_nas:/flights_files/MU/ -P