等待提示成功【rclone v1.57.0 has successfully installed.】。
配置OneDrive
运行rclone config
1
rclone config
输出:
1 2 3 4 5 6 7
root@instance-20220204-2125:~# rclone config <5>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/s/q> n name> onedrive-mac Option Storage. 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 / Better checksums for other remotes \ "hasher" 7 / Box \ "box" 8 / Cache a remote \ "cache" 9 / Citrix Sharefile \ "sharefile" 10 / Compress a remote \ "compress" 11 / Dropbox \ "dropbox" 12 / Encrypt/Decrypt a remote \ "crypt" 13 / Enterprise File Fabric \ "filefabric" 14 / FTP Connection \ "ftp" 15 / Google Cloud Storage (this is not Google Drive) \ "google cloud storage" 16 / Google Drive \ "drive" 17 / Google Photos \ "google photos" 18 / Hadoop distributed file system \ "hdfs" 19 / Hubic \ "hubic" 20 / In memory object storage system. \ "memory" 21 / Jottacloud \ "jottacloud" 22 / Koofr \ "koofr" 23 / Local Disk \ "local" 24 / Mail.ru Cloud \ "mailru" 25 / Mega \ "mega" 26 / Microsoft Azure Blob Storage \ "azureblob" 27 / Microsoft OneDrive \ "onedrive" 28 / OpenDrive \ "opendrive" 29 / OpenStack Swift (Rackspace Cloud Files, Memset Memstore, OVH) \ "swift" 30 / Pcloud \ "pcloud" 31 / Put.io \ "putio" 32 / QingCloud Object Storage \ "qingstor" 33 / SSH/SFTP Connection \ "sftp" 34 / Sia Decentralized Cloud \ "sia" 35 / Sugarsync \ "sugarsync" 36 / Tardigrade Decentralized Cloud Storage \ "tardigrade" 37 / Transparently chunk/split large files \ "chunker" 38 / Union merges the contents of several upstream fs \ "union" 39 / Uptobox \ "uptobox" 40 / Webdav \ "webdav" 41 / Yandex Disk \ "yandex" 42 / Zoho \ "zoho" 43 / http Connection \ "http" 44 / premiumize.me \ "premiumizeme" 45 / seafile \ "seafile"
Microsoft OneDrive编号为27,则输入27。 【client_id】和【client_secret】不了解的话直接默认即可。 服务提供商如果是21世纪互联选择【Azure and Office 365 operated by 21Vianet in China】,不清楚的话直接默认。 【Edit advanced config?】默认y 【Use auto config?】选择N,不自动配置
Storage> 27 Option client_id. OAuth Client Id. Leave blank normally. Enter a string value. Press Enter for the default (""). client_id> Option client_secret. OAuth Client Secret. Leave blank normally. Enter a string value. Press Enter for the default (""). client_secret> Option region. Choose national cloud region for OneDrive. Enter a string value. Press Enter for the default ("global"). Choose a number from below, or type in your own value. 1 / Microsoft Cloud Global \ "global" 2 / Microsoft Cloud for US Government \ "us" 3 / Microsoft Cloud Germany \ "de" 4 / Azure and Office 365 operated by 21Vianet in China \ "cn" region> Edit advanced config? y) Yes n) No (default) y/n> Use auto config? * Say Y if not sure * Say N if you are working on a remote or headless machine
y) Yes (default) n) No y/n> n Option config_token. For this to work, you will need rclone available on a machine that has a web browser available. For more help and alternate methods see: https://rclone.org/remote_setup/ Execute the following on the machine with the web browser (same rclone version recommended): rclone authorize "onedrive" Then paste the result. Enter a string value. Press Enter for the default ("").
root@instance-20220204-2125:~# rclone mount mac:/ /onedrive --copy-links --no-gzip-encoding --no-check-certificate --allow-other --allow-non-empty --umask 000 <5>NOTICE: One drive root '': --vfs-cache-mode writes or full is recommended for this remote as it can't stream