阿里云盘挂载 webdav再使用rclone上传文件
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | apt install rclone <br>正在读取软件包列表... 完成 正在分析软件包的依赖关系树... 完成 正在读取状态信息... 完成 下列软件包是自动安装的并且现在不需要了: 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) 的触发器 ... |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | 获取 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 |
1 2 3 4 5 | docker 安装 webdav-aliyundriver<br>将获取的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 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 | 设置 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 |
1 2 3 4 5 6 7 | 查看是否 成功 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, -
1 2 3 4 5 | 请参阅--no-traverse选项来控制rclone是否列出目标目录。 在将少量文件复制到大型目标时提供此选项可以大大加快传输速度。 例如,如果您在/path/to/src中有许多文件,但每天只有少数文件更改,则可以非常有效地复制最近更改的所有文件,如下所示: rclone copy --max-age 24h --no-traverse /nas_dirs/flights_files/MU/ yskj_nas:/flights_files/MU/ -P |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
· 周边上新:园子的第一款马克杯温暖上架