{"id":784,"date":"2021-08-11T09:45:01","date_gmt":"2021-08-11T01:45:01","guid":{"rendered":"https:\/\/www.eutaboo.com\/?p=784"},"modified":"2022-05-16T10:30:11","modified_gmt":"2022-05-16T02:30:11","slug":"%e6%8b%af%e6%95%91%e4%bd%a0%e7%9a%84%e5%b0%8f%e7%9b%98%e9%b8%a1%ef%bc%81rclone%e6%8c%82%e8%bd%bdgoogle-drive%e6%88%96onedirve","status":"publish","type":"post","link":"https:\/\/www.eutaboo.com\/index.php\/2021\/08\/11\/%e6%8b%af%e6%95%91%e4%bd%a0%e7%9a%84%e5%b0%8f%e7%9b%98%e9%b8%a1%ef%bc%81rclone%e6%8c%82%e8%bd%bdgoogle-drive%e6%88%96onedirve\/","title":{"rendered":"\u62ef\u6551\u4f60\u7684\u5c0f\u76d8\u9e21\uff01Rclone\u6302\u8f7dGoogle Drive\u6216OneDirve"},"content":{"rendered":"<p>\u53c2\u8003\uff1a<a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/blog.laoda.de\/archives\/make-vps-bigger#toc-head-2\" target=\"_blank\"  rel=\"nofollow\" >https:\/\/blog.laoda.de\/archives\/make-vps-bigger#toc-head-2<\/a><\/p>\n<h2>\u524d\u8a00<\/h2>\n<p>\u6709\u4e00\u4e9b\u5c0f\u9e21\uff0c\u5b83\u4eec\u7684\u7ebf\u8def\u914d\u7f6e\u5341\u5206\u4e0d\u9519\uff0c\u4f46\u5374\u6709\u4e2a\u81f4\u547d\u7f3a\u70b9\uff0c\u90a3\u5c31\u662f\u786c\u76d8\u5c0f\u3002\u6bd4\u5982\u73b0\u5728\u535a\u5ba2\u7528\u7684\u5c0f\u9e21\u65af\u5df4\u8fbe\uff0c\u8fd8\u6709\u5bcc\u5f3aaria2\u7528\u7684dedipath\uff0c\u786c\u76d8\u53ea\u670915G\u300110G\uff0c\u7f51\u7ad9\u968f\u4fbf\u653e\u70b9\u4e1c\u897f\u5c31\u6ee1\u4e86\uff0caria2\u4e5f\u6ca1\u6cd5\u4e0b\u5927\u4e8e10G\u7684\u4e1c\u897f\u3002\u90a3\u4e48\u6709\u4ec0\u4e48\u529e\u6cd5\u53ef\u4ee5\u89e3\u51b3\u5462\uff1f<br \/>\n\u90a3\u5c31\u662fOneDrive\u548cGoogle Drive\u4e86\u3002\u8fd9\u4e24\u4e2a\u5206\u522b\u53ef\u4ee5\u8fbe\u523025T\u548c1Pb\u7684\u5bb9\u91cf\uff0c\u5b8c\u5168\u53ef\u4ee5\u89e3\u51b3\u6211\u4eec\u7684\u4e00\u5207\u9700\u6c42\u3002\u63a5\u4e0b\u6765\u5c31\u662f\u6559\u7a0b\u3002<\/p>\n<h2>clone\u914d\u7f6e<\/h2>\n<p>Rclone\u7684\u914d\u7f6eOneDrive\u53ef\u4ee5\u53c2\u8003\u524d\u9762\u7684<a class=\"wp-editor-md-post-content-link\" href=\"https:\/\/www.eutaboo.com\/index.php\/2021\/08\/02\/%e6%89%8b%e6%8a%8a%e6%89%8b%e6%95%99%e4%bd%a0%e6%90%ad%e5%bb%ba%e7%a7%81%e4%ba%ba%e7%a6%bb%e7%ba%bf%e4%b8%8b%e8%bd%bd%e7%a5%9e%e5%99%a8aria2%ef%bc%8c%e6%90%ad%e9%85%8drclone%e8%87%aa%e5%8a%a8%e4%b8%8a\/#toc-head-3\">\u6587\u7ae0<\/a>,\u63a5\u4e0b\u6765\u6f14\u793aGoogle Drive\u7684\u914d\u7f6e<br \/>\n1. rclone config\u4fee\u6539\u914d\u7f6e\uff0c\u7136\u540e\u8f93\u5165<code>n<\/code>\uff0c\u5728name\u5904\u586b\u5165\u540d\u5b57<\/p>\n<pre><code class=\"language-ssh line-numbers\">root@linux:~# rclone config\nNo remotes found - make a new one\nn) New remote\ns) Set configuration password\nq) Quit config\nn\/s\/q&gt; n\nname&gt; gd\n<\/code><\/pre>\n<ol start=\"2\">\n<li>\u9009\u62e9Google Drive\uff0c\u8fd9\u91cc\u662f<code>15<\/code>\u3002\uff08\u770b\u597d\u4f60\u81ea\u5df1\u7684\u518d\u586b\uff09<\/li>\n<\/ol>\n<pre><code class=\"language-text line-numbers\">Type of storage to configure.\nEnter a string value. Press Enter for the default (\"\").\nChoose a number from below, or type in your own value\n1 \/ 1Fichier\n\\ \"fichier\"\n2 \/ Alias for an existing remote\n\\ \"alias\"\n3 \/ Amazon Drive\n\\ \"amazon cloud drive\"\n4 \/ Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, Digital Ocean, Dreamhost, IBM COS, Minio, SeaweedFS, and Tencent COS\n\\ \"s3\"\n5 \/ Backblaze B2\n\\ \"b2\"\n6 \/ Box\n\\ \"box\"\n7 \/ Cache a remote\n\\ \"cache\"\n8 \/ Citrix Sharefile\n\\ \"sharefile\"\n9 \/ Compress a remote\n\\ \"compress\"\n10 \/ Dropbox\n\\ \"dropbox\"\n11 \/ Encrypt\/Decrypt a remote\n\\ \"crypt\"\n12 \/ Enterprise File Fabric\n\\ \"filefabric\"\n13 \/ FTP Connection\n\\ \"ftp\"\n14 \/ Google Cloud Storage (this is not Google Drive)\n\\ \"google cloud storage\"\n15 \/ Google Drive\n\\ \"drive\"\n16 \/ Google Photos\n\\ \"google photos\"\n17 \/ Hadoop distributed file system\n\\ \"hdfs\"\n18 \/ Hubic\n\\ \"hubic\"\n19 \/ In memory object storage system.\n\\ \"memory\"\n20 \/ Jottacloud\n\\ \"jottacloud\"\n21 \/ Koofr\n\\ \"koofr\"\n22 \/ Local Disk\n\\ \"local\"\n23 \/ Mail.ru Cloud\n\\ \"mailru\"\n24 \/ Mega\n\\ \"mega\"\n25 \/ Microsoft Azure Blob Storage\n\\ \"azureblob\"\n26 \/ Microsoft OneDrive\n\\ \"onedrive\"\n27 \/ OpenDrive\n\\ \"opendrive\"\n28 \/ OpenStack Swift (Rackspace Cloud Files, Memset Memstore, OVH)\n\\ \"swift\"\n29 \/ Pcloud\n\\ \"pcloud\"\n30 \/ Put.io\n\\ \"putio\"\n31 \/ QingCloud Object Storage\n\\ \"qingstor\"\n32 \/ SSH\/SFTP Connection\n\\ \"sftp\"\n33 \/ Sugarsync\n\\ \"sugarsync\"\n34 \/ Tardigrade Decentralized Cloud Storage\n\\ \"tardigrade\"\n35 \/ Transparently chunk\/split large files\n\\ \"chunker\"\n36 \/ Union merges the contents of several upstream fs\n\\ \"union\"\n37 \/ Uptobox\n\\ \"uptobox\"\n38 \/ Webdav\n\\ \"webdav\"\n39 \/ Yandex Disk\n\\ \"yandex\"\n40 \/ Zoho\n\\ \"zoho\"\n41 \/ http Connection\n\\ \"http\"\n42 \/ premiumize.me\n\\ \"premiumizeme\"\n43 \/ seafile\n\\ \"seafile\"\nStorage&gt; 15\n<\/code><\/pre>\n<ol start=\"3\">\n<li>client id \u548cclient secret\u7559\u7a7a\uff0c\u76f4\u63a5\u7a7a\u683c\u8df3\u8fc7<\/li>\n<\/ol>\n<pre><code class=\"language-text line-numbers\">Google Application Client Id\nSetting your own is recommended.\nSee https:\/\/rclone.org\/drive\/#making-your-own-client-id for how to create your own.\nIf you leave this blank, it will use an internal key which is low performance.\nEnter a string value. Press Enter for the default (\"\").\nclient_id&gt; \nOAuth Client Secret\nLeave blank normally.\nEnter a string value. Press Enter for the default (\"\").\nclient_secret&gt;\n<\/code><\/pre>\n<ol start=\"4\">\n<li>\u8f93\u5165<code>1<\/code>\uff0c\u9009\u62e9\u5b8c\u5168<\/li>\n<\/ol>\n<pre><code class=\"language-text line-numbers\">Scope that rclone should use when requesting access from drive.\nEnter a string value. Press Enter for the default (\"\").\nChoose a number from below, or type in your own value\n1 \/ Full access all files, excluding Application Data Folder.\n\\ \"drive\"\n2 \/ Read-only access to file metadata and file contents.\n\\ \"drive.readonly\"\n\/ Access to files created by rclone only.\n3 | These are visible in the drive website.\n| File authorization is revoked when the user deauthorizes the app.\n\\ \"drive.file\"\n\/ Allows read and write access to the Application Data folder.\n4 | This is not visible in the drive website.\n\\ \"drive.appfolder\"\n\/ Allows read-only access to file metadata but\n5 | does not allow any access to read or download file content.\n\\ \"drive.metadata.readonly\"\nscope&gt; 1\n<\/code><\/pre>\n<ol start=\"5\">\n<li>root_folder_id\u548cservice_account_file\u7559\u7a7a\uff0c\u76f4\u63a5\u7a7a\u683c\u8df3\u8fc7\uff0c\u7136\u540eadvanced config\u8f93\u5165<code>n<\/code><\/li>\n<\/ol>\n<pre><code class=\"language-text line-numbers\">ID of the root folder\nLeave blank normally.\nFill in to access \"Computers\" folders (see docs), or for rclone to use\na non root folder as its starting point.\nEnter a string value. Press Enter for the default (\"\").\nroot_folder_id&gt; \nService Account Credentials JSON file path \nLeave blank normally.\nNeeded only if you want use SA instead of interactive login.\nLeading `~` will be expanded in the file name as will environment variables such as `${RCLONE_CONFIG_DIR}`.\nEnter a string value. Press Enter for the default (\"\").\nservice_account_file&gt; \nEdit advanced config?\ny) Yes\nn) No (default)\ny\/n&gt; n\n<\/code><\/pre>\n<ol start=\"6\">\n<li>auto config\u5904\u4e5f\u8f93\u5165<code>n<\/code>\uff0c\u7136\u540e\u590d\u5236\u7ed9\u51fa\u7684\u7f51\u5740\uff0c\u767b\u5f55\u81ea\u5df1\u7684Google\u8d26\u6237\uff0c\u5c06\u8fd4\u56de\u7684\u6388\u6743\u7801\u586b\u5165<\/li>\n<li>Configure this as a Shared Drive (Team Drive)?\u8fd9\u91cc\u6839\u636e\u81ea\u5df1\u7684\u9700\u8981\u6765\uff0c\u8f93\u5165<code>y<\/code>\u8868\u793a\u6302\u8f7d\u56e2\u961f\u76d8\uff0c<code>n<\/code>\u8868\u793a\u76f4\u63a5\u6302\u8f7d\u4e2a\u4eba\u7a7a\u95f4<\/li>\n<li>\u6210\u529f\u540e\uff0c\u8f93\u5165<code>y<\/code>\u6765\u5b8c\u6210\u914d\u7f6e\uff0c\u7136\u540e\u8f93\u5165<code>q<\/code>\u6765\u9000\u51fa\u64cd\u4f5c\u3002<\/li>\n<\/ol>\n<h2>\u6302\u8f7dGD<\/h2>\n<p>\u4e0b\u9762\u8981\u628a Google Drive \u7f51\u76d8\u6302\u8f7d\u5230\u4e91\u4e3b\u673a\/Vps \u4e0a\u548c\u8bbe\u7f6e\u5f00\u673a\u81ea\u542f\uff0c\u81ea\u52a8\u6302\u8f7d Google Drive \u7f51\u76d8<br \/>\n\u9996\u5148\u5b89\u88c5fuse:<\/p>\n<pre><code class=\"language-ssh line-numbers\">apt-get install fuse  #debian\n\nyum install fuse   #centos\n<\/code><\/pre>\n<p>\u65b0\u5efa\u4e00\u4e2a\u4f60\u8981\u6302\u8f7d\u7684\u76ee\u5f55\uff0c\u4f8b\u5982\u6211\u8981\u6302\u8f7d\u5230<code>\/home\/gdrive<\/code><\/p>\n<pre><code class=\"language-ssh line-numbers\">mkdir -p \/home\/gdrive\n<\/code><\/pre>\n<p>\u518d\u6267\u884c\u6302\u8f7d\u547d\u4ee4\uff1a<\/p>\n<pre><code class=\"language-ssh line-numbers\">rclone mount gd:movie \/home\/gdrive --allow-other --allow-non-empty --vfs-cache-mode writes\n<\/code><\/pre>\n<p>\u8fd9\u91cc<code>gd<\/code>\u662frclone\u91ccGoogle Drive\u7684name\uff1b<code>movie<\/code>\u662fGoogle Drive\u91cc\u8981\u5b58\u653e\u7684\u5b50\u76ee\u5f55\uff0c\u7559\u7a7a\u5219\u76f4\u63a5\u653e\u6839\u76ee\u5f55\uff1b<code>\/home\/gdrive<\/code>\u662fVPS\u91cc\u7684\u6302\u8f7d\u76ee\u5f55<br \/>\n\u5378\u8f7dGoogle Drive<\/p>\n<pre><code class=\"language-ssh line-numbers\">fusermount -qzu \/home\/gdrive\n<\/code><\/pre>\n<p>\u6302\u8f7d\u53ea\u8981\u51e0\u79d2\u949f\uff0c\u4f46\u7ec8\u7aef\u4e0d\u4f1a\u8fd4\u56de\u6210\u529f\u4fe1\u606f\uff0c\u5173\u95ed SSH \u91cd\u8fde\u5373\u53ef\u3002<br \/>\n\u91cd\u8fde\u540e\u67e5\u770b\u662f\u5426\u6302\u8f7d\u6210\u529f\uff1a<\/p>\n<pre><code class=\"language-ssh line-numbers\">df -h\n<\/code><\/pre>\n<p>\u6709\u770b\u5230 gd\uff0c\u4f7f\u7528\u91cf\u548c\u672c\u5730\u4e3b\u673a\u8def\u5f84\u5373\u6210\u529f\u6302\u8f7d\u3002<br \/>\n\u63a5\u4e0b\u6765\u8bbe\u7f6e\u5f00\u673a\u81ea\u52a8\u6302\u8f7d<br \/>\n\u65b0\u5efa\u4e00\u4e2a\/usr\/systemd\/system\/rclone.service \u6587\u4ef6\uff0c\u5185\u5bb9\u4e3a\uff1a<\/p>\n<pre><code class=\"language-txt line-numbers\">[Unit]\nDescription=rclone\n\n[Service]\nUser=root\nExecStart=\/usr\/bin\/rclone mount gd:movie \/home\/gdrive --allow-other --allow-non-empty --vfs-cache-mode writes\nRestart=on-abort\n\n[Install]\nWantedBy=multi-user.target\n<\/code><\/pre>\n<p>\u6ce8\u610f\u4fee\u6539\u6302\u8f7d\u547d\u4ee4\u4e3a\u4f60\u4e3b\u673a\u7684\u8def\u5f84\u3002<br \/>\n\u5982\u679c\u9700\u8981\u6302\u8f7d\u591a\u4e2a\u7f51\u76d8\uff08\u6bd4\u5982\u6211\u8fd8\u8981\u6302\u5728\u4e00\u4e2aOD\uff09\uff0c\u6309\u4e0a\u9762\u7684\u6559\u7a0b\u65b0\u8fd0\u884c\u4e2a Rclone \u914d\u7f6e\uff0c\u518d\u65b0\u5efa\u4e00\u4e2a<code>\/etc\/systemd\/system\/rclone2.service<\/code> \u6587\u4ef6<br \/>\n\u5982\u679c\u8fd8\u6709\u7b2c\u4e09\u4e2a\uff0c\u5c31\u4ee5\u6b64\u7c7b\u63a8<br \/>\n\u7136\u540e\u91cd\u8f7d daemon\uff0c\u8ba9\u65b0\u7684\u670d\u52a1\u6587\u4ef6\u751f\u6548\uff1a<\/p>\n<pre><code class=\"language-ssh line-numbers\">systemctl daemon-reload\n<\/code><\/pre>\n<p>\u7528 systemctl \u6765\u542f\u52a8 rclone<\/p>\n<pre><code class=\"language-ssh line-numbers\">systemctl start rclone\nsystemctl start rclone2 #\u5982\u679c\u6709\u7b2c\u4e8c\u4e2a\u7f51\u76d8\n<\/code><\/pre>\n<p>\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8\uff1a<\/p>\n<pre><code class=\"language-ssh line-numbers\">systemctl enable rclone\n<\/code><\/pre>\n<p>\u505c\u6b62\u3001\u67e5\u770b\u72b6\u6001\u53ef\u4ee5\u7528\uff1a<\/p>\n<pre><code class=\"language-ssh line-numbers\">systemctl stop rclone\nsystemctl status rclone\n<\/code><\/pre>\n<p>\u91cd\u542f\u4f60\u7684\u4e91\u4e3b\u673a\/VPS:<\/p>\n<pre><code class=\"language-ssh line-numbers\">reboot\n<\/code><\/pre>\n<p>\u91cd\u542f\u540e\u67e5\u770b\u4e00\u4e0b rclone \u7684\u670d\u52a1\u662f\u5426\u542f\u52a8\uff0cGoogleDrive \u662f\u5426\u6b63\u5e38\u6302\u8f7d<\/p>\n<pre><code class=\"language-ssh line-numbers\">systemctl status rclone\ndf -h\n<\/code><\/pre>\n<p>OK ! \u5b8c\u6210.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u53c2\u8003\uff1ahttps:\/\/blog.laoda.de\/archives\/make-vps-bigger#toc-head-2 \u524d\u8a00 \u6709 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[4,5],"tags":[69],"class_list":["post-784","post","type-post","status-publish","format-standard","hentry","category-4","category-5","tag-rclone"],"views":3223,"_links":{"self":[{"href":"https:\/\/www.eutaboo.com\/index.php\/wp-json\/wp\/v2\/posts\/784","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.eutaboo.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.eutaboo.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.eutaboo.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.eutaboo.com\/index.php\/wp-json\/wp\/v2\/comments?post=784"}],"version-history":[{"count":1,"href":"https:\/\/www.eutaboo.com\/index.php\/wp-json\/wp\/v2\/posts\/784\/revisions"}],"predecessor-version":[{"id":926,"href":"https:\/\/www.eutaboo.com\/index.php\/wp-json\/wp\/v2\/posts\/784\/revisions\/926"}],"wp:attachment":[{"href":"https:\/\/www.eutaboo.com\/index.php\/wp-json\/wp\/v2\/media?parent=784"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.eutaboo.com\/index.php\/wp-json\/wp\/v2\/categories?post=784"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.eutaboo.com\/index.php\/wp-json\/wp\/v2\/tags?post=784"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}