id: f1e4c0e25404440b901c9b1a54649033
parent_id: 
item_type: 1
item_id: 4a0ad90f3184444397e656dd28e97300
item_updated_time: 1764345479648
title_diff: "[{\"diffs\":[[1,\"使用 rclone 将 Google Drive 文件同步至 OneDrive  常阳时光\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":45}]"
body_diff: "[{\"diffs\":[[1,\"<html>\\\r\\\n<head>\\\r\\\n  <title>使用 rclone 将 Google Drive 文件同步至 OneDrive | 常阳时光</title>\\\r\\\n  <basefont face=\\\"微软雅黑\\\" size=\\\"2\\\" />\\\r\\\n  <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html;charset=utf-8\\\" />\\\r\\\n  <meta name=\\\"exporter-version\\\" content=\\\"YXBJ Windows/608924 (zh-CN, DDL); Windows/10.0.0 (Win64); EDAMVersion=V2;\\\"/>\\\r\\\n  <style>\\\r\\\n\\tbody, td {\\\r\\\n\\t  font-family: 微软雅黑;\\\r\\\n\\t  font-size: 12pt;\\\r\\\n\\t}\\\r\\\n  </style>\\\r\\\n</head>\\\r\\\n<body>\\\r\\\n<a name=\\\"15324\\\"></a>\\\r\\\n<h1>使用 rclone 将 Google Drive 文件同步至 OneDrive | 常阳时光</h1>\\\r\\\n\\\r\\\n<div><span>\\\n  <div>\\\n<div style=\\\"font-size: 16px; display:block; min-width: 100%;\\\"> <div style=\\\"background-color:transparent;font:inherit;vertical-align:baseline;\\\"><div style=\\\"font-family:&quot;PT Serif&quot;;font-size:16px;line-height:1.5em;color:rgb(31, 9, 9);text-align:left;background-color:transparent;font:inherit;vertical-align:baseline;\\\"><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\"><div style=\\\"width:36em;z-index:200;padding-left:2em;padding-right:2em;margin-left:auto;margin-right:auto;position:relative;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\"><div style=\\\"position:relative;margin-left:-25px;margin-right:25px;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\"><div style=\\\"padding-top:4.5em;padding-bottom:9em;position:relative;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\"><div style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"><div style=\\\"margin-bottom:0px;position:relative;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\"><div style=\\\"margin-bottom:0px;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\"><div style=\\\"margin-bottom:0px;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\"><h1 style=\\\"font-family:&quot;PT Serif&quot;;text-align:left;padding:0px;margin:0px;border:0px;font:inherit;vertical-align:baseline;font-weight:normal;font-size:35px;line-height:35px;margin-bottom:20px;\\\">使用 rclone 将 Google Drive 文件同步至 OneDrive</h1><div style=\\\"margin-bottom:0px;position:relative;margin:0px;height:1em;line-height:1;text-align:center;padding:0px;border:0px;font:inherit;vertical-align:baseline;padding-top:1.5em;padding-bottom:1.5em;\\\"><div style=\\\"background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);margin-bottom:0px;position:absolute;left:-4em;top:50%;z-index:10;width:100%;padding-left:4em;padding-right:4em;height:0.1em;margin:0px;opacity:0.5;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\"><span style=\\\"font:inherit;background:-webkit-linear-gradient(0deg, rgb(243, 242, 238) 1%, rgb(31, 9, 9) 50%, rgb(243, 242, 238) 99%);position:absolute;left:-4em;top:50%;z-index:10;width:100%;padding-left:4em;padding-right:4em;height:0.1em;margin:0px;opacity:0.5;\\\"></span></div></div></div>\\\n\\\n\\t\\\n\\t\\t\\t\\t\\t\\\n\\t\\t\\t\\t\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">前几天上了博友「<a href=\\\"https://www.lingchenzi.com/\\\" style=\\\"color:rgb(6, 85, 136);margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;text-decoration:none;\\\" target=\\\"_blank\\\">灵尘居</a>」的 Office 365 车，1T OneDrive 到手，手机照片一直喂 Google AI，挺方便的，以前还会同步一份到家里的垃圾西数 NAS，不过并不太自动，后来就懒得弄了。<br/><br/>Google 虽然是大厂，但是数据只有一份，还是怕怕，多一个备份不是坏事。苹果 iCloud 不错，但是贼贵，况且我只有一个进过水的 SE……</p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">那就 OneDrive 吧，Office 365 就有 1T，前阵子在老司机群看到博友合租 Office 365 家庭套餐，还挺划算的，于是就上车了。</p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">原本打算以前的照片就不管了，新的照片直接手机上传 <a href=\\\"https://photos.google.com/\\\" style=\\\"color:rgb(6, 85, 136);margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;text-decoration:none;\\\" target=\\\"_blank\\\">Google Photos</a> 和 OneDrive。试了两天，OneDrive 在后台不能工作，并且开后台上传要允许始终使用定位。试着给了权限，OneDrive 还是不干活，锁屏一会就死掉。</p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">Google 也没找到现成的方法，找到一个第三方服务「<a href=\\\"https://www.multcloud.com/\\\" style=\\\"color:rgb(6, 85, 136);margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;text-decoration:none;\\\" target=\\\"_blank\\\">MultCloud</a>」，看着可行，免费版每月 50G 流量，群里博友也推荐，不过怕开始流量不够，没有尝试。</p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">继续找其他方法：ifttt，这个只能同步新增；买个大盘 Windows VPS，Google Drive 同步下来再上传到 OneDrive，这个太累，不便宜；Google Drive 同步下来工作电脑再上传到 OneDrive，这个更累，还要爱国流量……</p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">想起在 RSS 订阅的博客看到过将 OneDrive 挂载到 <a href=\\\"https://cyhour.com/tag/vps/\\\" style=\\\"color:rgb(6, 85, 136);margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;text-decoration:none;\\\" target=\\\"_blank\\\">VPS</a> 当本地硬盘用，还可以自动上传文件到 OneDrive。翻了一下，这货是 rclone。</p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">官网看了一下：<a href=\\\"https://rclone.org/\\\" style=\\\"color:rgb(6, 85, 136);margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;text-decoration:none;\\\" target=\\\"_blank\\\">rclone - rsync for cloud storage</a></p>\\\n<blockquote style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;quotes:none;margin-bottom:1.5em;font-style:italic;border-left:5px solid;margin-left:2em;padding-left:1em;\\\"><span style=\\\"font:inherit;quotes:none;font-style:italic;\\\"></span><p style=\\\"margin-bottom:0px;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\">Rclone is a command line program to sync files and directories to and from：Amazon Drive、Amazon S3、Backblaze B2、Box、Ceph、DigitalOcean Spaces、Dreamhost、Dropbox、FTP、Google Cloud Storage、Google Drive、HTTP、Hubic、Jottacloud、IBM COS S3、Memset Memstore、Mega、Microsoft Azure Blob Storage、Microsoft OneDrive、Minio、Nextcloud、OVH、OpenDrive、Openstack Swift、Oracle Cloud Storage、ownCloud、pCloud、put.io、QingStor、Rackspace Cloud Files、SFTP、Wasabi、WebDAV、Yandex Disk、The local filesystem</p><span style=\\\"font:inherit;quotes:none;font-style:italic;\\\"></span></blockquote>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">rclone 看样子可行，<a href=\\\"https://cyhour.com/vps\\\" style=\\\"color:rgb(6, 85, 136);margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;text-decoration:none;\\\" target=\\\"_blank\\\">VPS</a> 安装 rclone，连接 Google Drive 和 OneDrive，通过 VPS 将 Google Drive 中的相片同步到 OneDrive。</p>\\\n<h2 style=\\\"font-family:&quot;PT Serif&quot;;text-align:left;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-weight:bold;font-size:30px;line-height:35px;margin-top:35px;margin-bottom:15px;\\\">rclone 安装、连接网盘</h2>\\\n<h3 style=\\\"font-family:&quot;PT Serif&quot;;text-align:left;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-weight:normal;font-size:30px;line-height:35px;margin-top:35px;margin-bottom:15px;\\\">rclone 安装</h3>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">执行命令：<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">curl https://rclone.org/install.sh | sudo bash</code></p>\\\n<h3 style=\\\"font-family:&quot;PT Serif&quot;;text-align:left;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-weight:normal;font-size:30px;line-height:35px;margin-top:35px;margin-bottom:15px;\\\">连接网盘</h3>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">连接 <a href=\\\"https://rclone.org/drive/\\\" style=\\\"color:rgb(6, 85, 136);margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;text-decoration:none;\\\" target=\\\"_blank\\\">Google Drive</a>，执行命令进入配置菜单：<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">rclone config</code></p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">初次进入会有如下菜单提示：</p>\\\n<blockquote style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;quotes:none;margin-bottom:1.5em;font-style:italic;border-left:5px solid;margin-left:2em;padding-left:1em;\\\"><span style=\\\"font:inherit;quotes:none;font-style:italic;\\\"></span><p style=\\\"margin-bottom:0px;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\">#~:rclone config<br/>\\\nNo remotes found - make a new one<br/>\\\nn) New remote -&gt; 连接新远程网盘<br/>\\\ns) Set configuration password -&gt; 设置密码保护配置信息<br/>\\\nq) Quit config -&gt; 退出<br/>\\\nn/s/q&gt;</p><span style=\\\"font:inherit;quotes:none;font-style:italic;\\\"></span></blockquote>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">需要加密码保护配置信息就按 s 进入设置密码，若不需要，按 n 进入连接网盘。</p>\\\n<pre style=\\\"background-color:rgb(243, 242, 238);font-family:Inconsolata;width:auto;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\"><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:1.15em;line-height:1.71429em;\\\">n/s/q&gt; n\\\nname&gt; gdrive -&gt; 网盘名字，写一个方便自己识别的名字就好\\\nType of storage to configure.\\\nEnter a string value. Press Enter for the default (&quot;&quot;).\\\nChoose a number from below, or type in your own value\\\n 1 / Alias for a existing remote\\\n   \\\\ &quot;alias&quot;\\\n 2 / Amazon Drive\\\n   \\\\ &quot;amazon cloud drive&quot;\\\n 3 / Amazon S3 Compliant Storage Providers (AWS, Ceph, Dreamhost, IBM COS, Minio)\\\n   \\\\ &quot;s3&quot;\\\n 4 / Backblaze B2\\\n   \\\\ &quot;b2&quot;\\\n 5 / Box\\\n   \\\\ &quot;box&quot;\\\n 6 / Cache a remote\\\n   \\\\ &quot;cache&quot;\\\n 7 / Dropbox\\\n   \\\\ &quot;dropbox&quot;\\\n 8 / Encrypt/Decrypt a remote\\\n   \\\\ &quot;crypt&quot;\\\n 9 / FTP Connection\\\n   \\\\ &quot;ftp&quot;\\\n10 / Google Cloud Storage (this is not Google Drive)\\\n   \\\\ &quot;google cloud storage&quot;\\\n11 / Google Drive\\\n   \\\\ &quot;drive&quot;\\\n12 / Hubic\\\n   \\\\ &quot;hubic&quot;\\\n13 / JottaCloud\\\n   \\\\ &quot;jottacloud&quot;\\\n14 / Local Disk\\\n   \\\\ &quot;local&quot;\\\n15 / Mega\\\n   \\\\ &quot;mega&quot;\\\n16 / Microsoft Azure Blob Storage\\\n   \\\\ &quot;azureblob&quot;\\\n17 / Microsoft OneDrive\\\n   \\\\ &quot;onedrive&quot;\\\n18 / OpenDrive\\\n   \\\\ &quot;opendrive&quot;\\\n19 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH)\\\n   \\\\ &quot;swift&quot;\\\n20 / Pcloud\\\n   \\\\ &quot;pcloud&quot;\\\n21 / QingCloud Object Storage\\\n   \\\\ &quot;qingstor&quot;\\\n22 / SSH/SFTP Connection\\\n   \\\\ &quot;sftp&quot;\\\n23 / Webdav\\\n   \\\\ &quot;webdav&quot;\\\n24 / Yandex Disk\\\n   \\\\ &quot;yandex&quot;\\\n25 / http Connection\\\n   \\\\ &quot;http&quot;\\\nStorage&gt; 11 -&gt; 11 是 Google Drive\\\nGoogle Application Client Id\\\nLeave blank normally.\\\nEnter a string value. Press Enter for the default (&quot;&quot;).\\\nclient_id&gt; -&gt; 留空，按回车下一步就好\\\nGoogle Application Client Secret\\\nLeave blank normally.\\\nEnter a string value. Press Enter for the default (&quot;&quot;).\\\nclient_secret&gt; -&gt; 留空，按回车下一步就好\\\nScope that rclone should use when requesting access from drive.\\\nEnter a string value. Press Enter for the default (&quot;&quot;).\\\nChoose a number from below, or type in your own value\\\n 1 / Full access all files, excluding Application Data Folder.\\\n   \\\\ &quot;drive&quot;\\\n 2 / Read-only access to file metadata and file contents.\\\n   \\\\ &quot;drive.readonly&quot;\\\n   / Access to files created by rclone only.\\\n 3 | These are visible in the drive website.\\\n   | File authorization is revoked when the user deauthorizes the app.\\\n   \\\\ &quot;drive.file&quot;\\\n   / Allows read and write access to the Application Data folder.\\\n 4 | This is not visible in the drive website.\\\n   \\\\ &quot;drive.appfolder&quot;\\\n   / Allows read-only access to file metadata but\\\n 5 | does not allow any access to read or download file content.\\\n   \\\\ &quot;drive.metadata.readonly&quot;\\\nscope&gt; 2 -&gt; 1 是拥有所有权限，包括删除；2 是只能访问所有文件，不能删除，按需要选择吧\\\nID of the root folder\\\nLeave blank normally.\\\nFill in to access &quot;Computers&quot; folders. (see docs).\\\nEnter a string value. Press Enter for the default (&quot;&quot;).\\\nroot_folder_id&gt; -&gt; 留空，按回车下一步就好\\\nService Account Credentials JSON file path\\\nLeave blank normally.\\\nNeeded only if you want use SA instead of interactive login.\\\nEnter a string value. Press Enter for the default (&quot;&quot;).\\\nservice_account_file&gt; -&gt; 留空，按回车下一步就好\\\nEdit advanced config? (y/n)\\\ny) Yes\\\nn) No\\\ny/n&gt; n -&gt; 一般不需要高级设置，选择 n 就好\\\nRemote config\\\nUse auto config?\\\n * Say Y if not sure\\\n * Say N if you are working on a remote or headless machine or Y didn't work\\\ny) Yes\\\nn) No\\\ny/n&gt; n -&gt; 如果是在 VPS 上连接，选 n 吧\\\nIf your browser doesn't open automatically go to the following link: https://accounts.google.com/o/oauth2/auth?access_type=offline&amp;client_id=**************************************\\\nLog in and authorize rclone for access\\\nEnter verification code&gt; **************zN5****vd5*******************bwZethESs\\\nConfigure this as a team drive?\\\ny) Yes\\\nn) No\\\ny/n&gt; n\\\n--------------------\\\n[remote]\\\nclient_id = \\\nclient_secret = \\\nscope = drive\\\nroot_folder_id = \\\nservice_account_file =\\\ntoken = {&quot;access_token&quot;:&quot;XXX&quot;,&quot;token_type&quot;:&quot;Bearer&quot;,&quot;refresh_token&quot;:&quot;XXX&quot;,&quot;expiry&quot;:&quot;2018-09-16T13:57:58.955387075Z&quot;}\\\n--------------------\\\ny) Yes this is OK\\\ne) Edit this remote\\\nd) Delete this remote\\\ny/e/d&gt; y</code></pre>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">至此 Google Drive 连接完成，可以执行命令检查一下是否真的能连接上：</p>\\\n<blockquote style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;quotes:none;margin-bottom:1.5em;font-style:italic;border-left:5px solid;margin-left:2em;padding-left:1em;\\\"><span style=\\\"font:inherit;quotes:none;font-style:italic;\\\"></span><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">#列出顶级文件夹，（gdrive 是前面第一步设置的名字，如果配置设置了密码会提示输入密码）<br/>\\\nrclone lsd gdrive:  </p>\\\n<p style=\\\"margin-bottom:0px;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\">#列出所有文件<br/>\\\nrclone ls gdrive:</p><span style=\\\"font:inherit;quotes:none;font-style:italic;\\\"></span></blockquote>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">连接 <a href=\\\"https://rclone.org/onedrive/\\\" style=\\\"color:rgb(6, 85, 136);margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;text-decoration:none;\\\" target=\\\"_blank\\\">OneDrive</a>，方法类似，命令进入配置：<code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">rclone config</code></p>\\\n<pre style=\\\"background-color:rgb(243, 242, 238);font-family:Inconsolata;width:auto;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\"><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:1.15em;line-height:1.71429em;\\\">#~: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; onedrive\\\nType of storage to configure.\\\nEnter a string value. Press Enter for the default (&quot;&quot;).\\\nChoose a number from below, or type in your own value\\\n 1 / Alias for a existing remote\\\n   \\\\ &quot;alias&quot;\\\n 2 / Amazon Drive\\\n   \\\\ &quot;amazon cloud drive&quot;\\\n 3 / Amazon S3 Compliant Storage Providers (AWS, Ceph, Dreamhost, IBM COS, Minio)\\\n   \\\\ &quot;s3&quot;\\\n 4 / Backblaze B2\\\n   \\\\ &quot;b2&quot;\\\n 5 / Box\\\n   \\\\ &quot;box&quot;\\\n 6 / Cache a remote\\\n   \\\\ &quot;cache&quot;\\\n 7 / Dropbox\\\n   \\\\ &quot;dropbox&quot;\\\n 8 / Encrypt/Decrypt a remote\\\n   \\\\ &quot;crypt&quot;\\\n 9 / FTP Connection\\\n   \\\\ &quot;ftp&quot;\\\n10 / Google Cloud Storage (this is not Google Drive)\\\n   \\\\ &quot;google cloud storage&quot;\\\n11 / Google Drive\\\n   \\\\ &quot;drive&quot;\\\n12 / Hubic\\\n   \\\\ &quot;hubic&quot;\\\n13 / JottaCloud\\\n   \\\\ &quot;jottacloud&quot;\\\n14 / Local Disk\\\n   \\\\ &quot;local&quot;\\\n15 / Mega\\\n   \\\\ &quot;mega&quot;\\\n16 / Microsoft Azure Blob Storage\\\n   \\\\ &quot;azureblob&quot;\\\n17 / Microsoft OneDrive\\\n   \\\\ &quot;onedrive&quot;\\\n18 / OpenDrive\\\n   \\\\ &quot;opendrive&quot;\\\n19 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH)\\\n   \\\\ &quot;swift&quot;\\\n20 / Pcloud\\\n   \\\\ &quot;pcloud&quot;\\\n21 / QingCloud Object Storage\\\n   \\\\ &quot;qingstor&quot;\\\n22 / SSH/SFTP Connection\\\n   \\\\ &quot;sftp&quot;\\\n23 / Webdav\\\n   \\\\ &quot;webdav&quot;\\\n24 / Yandex Disk\\\n   \\\\ &quot;yandex&quot;\\\n25 / http Connection\\\n   \\\\ &quot;http&quot;\\\nStorage&gt; 17\\\nMicrosoft App Client Id\\\nLeave blank normally.\\\nEnter a string value. Press Enter for the default (&quot;&quot;).\\\nclient_id&gt;\\\nMicrosoft App Client Secret\\\nLeave blank normally.\\\nEnter a string value. Press Enter for the default (&quot;&quot;).\\\nclient_secret&gt;\\\nEdit advanced config? (y/n)\\\ny) Yes\\\nn) No\\\ny/n&gt; n\\\nRemote config\\\nChoose OneDrive account type?\\\n * Say b for a OneDrive business account -&gt; b 商业版\\\n * Say p for a personal OneDrive account -&gt; p 个人版\\\nb) Business\\\np) Personal\\\nb/p&gt; p\\\nUse auto config?\\\n * Say Y if not sure\\\n * Say N if you are working on a remote or headless machine\\\ny) Yes\\\nn) No\\\ny/n&gt; n\\\nFor this to work, you will need rclone available on a machine that has a web browser available.\\\nExecute the following on your machine:\\\n        rclone authorize &quot;onedrive&quot;\\\nThen paste the result below:（需要在能打开浏览器的电脑上获取，方法见下面：OneDrive 授权码获取方法）\\\nresult&gt;{&quot;access_token&quot;:&quot;$$$$$$$$$$$$$$&quot;,&quot;expiry&quot;:&quot;2018-09-03T08:43:55.5290909+08:00&quot;}\\\n2018/09/03 07:47:11 ERROR : Failed to save new token in config file: section 'onedrive' not found\\\n--------------------\\\n[onedrive]\\\ntype = onedrive\\\ntoken = {&quot;access_token&quot;:&quot;$$$$$$$$$$$$$$&quot;,&quot;expiry&quot;:&quot;2018-09-01T08:43:55.5290909+08:00&quot;}\\\n--------------------\\\ny) Yes this is OK\\\ne) Edit this remote\\\nd) Delete this remote\\\ny/e/d&gt; y\\\nCurrent remotes:\\\n\\\nName                 Type\\\n====                 ====\\\nonedrive             onedrive\\\n\\\ne) Edit existing remote\\\nn) New remote\\\nd) Delete remote\\\nr) Rename remote\\\nc) Copy remote\\\ns) Set configuration password\\\nq) Quit config\\\ne/n/d/r/c/s/q&gt; q\\\n</code></pre>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">OneDrive 授权码获取方法：</p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">官网下载 rclone Windows 版，地址：<a href=\\\"https://rclone.org/downloads/\\\" style=\\\"color:rgb(6, 85, 136);margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;text-decoration:none;\\\" target=\\\"_blank\\\">https://rclone.org/downloads/</a></p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">如 Rclone Download v1.43 Windows 64 位：https://downloads.rclone.org/v1.43/rclone-v1.43-windows-amd64.zip，解压到 C 盘根目录，文件夹重命名为 rc，然后参考下面方法即可获取授权。</p>\\\n<pre style=\\\"background-color:rgb(243, 242, 238);font-family:Inconsolata;width:auto;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\"><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:1.15em;line-height:1.71429em;\\\">Microsoft Windows [版本 10.0.14393]\\\n(c) 2016 Microsoft Corporation。保留所有权利。\\\nC:\\\\Users\\\\Administrator&gt;cd c:\\\\\rc\\\nc:\\\\\rc&gt;rclone authorize &quot;onedrive&quot;\\\nChoose OneDrive account type?\\\n * Say b for a OneDrive business account\\\n * Say p for a personal OneDrive account\\\nb) Business\\\np) Personal\\\nb/p&gt; p\\\nIf your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth\\\nLog in and authorize rclone for access\\\nWaiting for code...\\\nGot code\\\nPaste the following into your remote machine ---&gt;\\\n{&quot;access_token&quot;:&quot;***************########################################################################################################################**************************************************************************************************************************************************************************************************************$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$&quot;,&quot;expiry&quot;:&quot;2018-09-01T01:43:55.5290909+08:00&quot;}\\\n&lt;---End paste</code></pre>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">然后将 { } 内的内容（包括{}）复制到前面 result&gt; 后面，回车即可。</p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">同样，执行 ls 或者 lsd 命令检查是否连接成功：</p>\\\n<blockquote style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;quotes:none;margin-bottom:1.5em;font-style:italic;border-left:5px solid;margin-left:2em;padding-left:1em;\\\"><span style=\\\"font:inherit;quotes:none;font-style:italic;\\\"></span><p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">#列出顶级文件夹，（gdrive 是前面第一步设置的名字，如果配置设置了密码会提示输入密码）<br/>\\\nrclone lsd onedrive:  </p>\\\n<p style=\\\"margin-bottom:0px;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\">#列出所有文件<br/>\\\nrclone ls onedrive:</p><span style=\\\"font:inherit;quotes:none;font-style:italic;\\\"></span></blockquote>\\\n<h2 style=\\\"font-family:&quot;PT Serif&quot;;text-align:left;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-weight:bold;font-size:30px;line-height:35px;margin-top:35px;margin-bottom:15px;\\\">定时执行脚本</h2>\\\n<h3 style=\\\"font-family:&quot;PT Serif&quot;;text-align:left;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-weight:normal;font-size:30px;line-height:35px;margin-top:35px;margin-bottom:15px;\\\">rclone 命令大全</h3>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">如果用来备份或者同步文件，用到的命令可能就两个：rclone_copy 和 rclone_sync。</p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">rclone_copy 是复制，配合附加参数 --ignore-existing 可以假装增量备份；</p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">rclone_sync 是源目录同步到目标目录，使两者一致，会删除目标目录多余内容，测试时可以加上 --dry-run，检查会复制和删除那些文件。</p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">rclone 目前可用命令如下（有需要点击展开查看）：▼展开</p>\\\n\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\"><a href=\\\"https://cyhour.com/out/bwh43\\\" style=\\\"color:rgb(6, 85, 136);margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;text-decoration:none;\\\" target=\\\"_blank\\\">搬瓦工 VPS</a>（KVM，加拿大机房，1核 CPU，512M 内存，11GB SSD，550G 流量）实测，2018-9-2 15:00 左右，开始执行 rclone copy 命令将 Google Drive 上的 Google Photos 复制到 OneDrive 上的 GooglePhotos 目录，2018-9-4 05:30 左右复制完毕，数据约 166G。</p>\\\n<pre style=\\\"background-color:rgb(243, 242, 238);font-family:Inconsolata;width:auto;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\"><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:1.15em;line-height:1.71429em;\\\">yum install screen\\\nscreen -S rclone #第一次同步大量数据使用 screen 会话尽可能保护 rclone 执行不被中断\\\nrclone copy gdrive:GooglePhotos onedrive:GooglePhotos</code></pre>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">人工粗略检查了一下，看样子是同步成功了。第一次同步因为数据量可能比较大，需要时间比较长，VPS 流量也会耗掉不少。我实测同步 166G，VPS 耗掉的流量大概是这个两倍。数据量大的话最好在流量充裕的 <a href=\\\"https://cyhour.com/vps\\\" style=\\\"color:rgb(6, 85, 136);margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;text-decoration:none;\\\" target=\\\"_blank\\\">VPS</a> 上进行。</p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">第一次同步完成，就可以 VPS 上（每天/周/月，按需选择）定时执行脚本自动同步。可以选择使用 rclone_copy --ignore-existing 进行增量备份（没有实测，按官方说明是可以实现），或者使用 rclone sync 同步。</p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">我希望 OneDrive 上的备份与 Google Drive 一致，所以每天定时执行 rclone sync gdrive:GooglePhotos onedrive:GooglePhotos</p>\\\n<blockquote style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;quotes:none;margin-bottom:1.5em;font-style:italic;border-left:5px solid;margin-left:2em;padding-left:1em;\\\"><span style=\\\"font:inherit;quotes:none;font-style:italic;\\\"></span><p style=\\\"margin-bottom:0px;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\">/usr/bin/rclone sync gdrive:GooglePhotos onedrive:GooglePhotos &gt;&gt; /root/rclone.log 2&gt;&amp;1</p><span style=\\\"font:inherit;quotes:none;font-style:italic;\\\"></span></blockquote>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">配合 crontab 定时执行，比如每天 4:44 执行一次，日志写到 /root/rclone.log。执行 <code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\">crontab -e</code>，i，添加下面代码进去，按一下 Esc，然后输入 :wq 回车保存退出。</p>\\\n<pre style=\\\"background-color:rgb(243, 242, 238);font-family:Inconsolata;width:auto;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:0.875em;line-height:1.71429em;\\\"><code style=\\\"font-family:Inconsolata;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-size:1.15em;line-height:1.71429em;\\\">44 4 * * * /usr/bin/rclone sync gdrive:GooglePhotos onedrive:GooglePhotos &gt;&gt; /root/rclone.log 2&gt;&amp;1</code></pre>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">注：不需要日志的话把 &gt;&gt; /root/rclone.log 2&gt;&amp;1 去掉。</p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">然后重启一下 crond 服务即可。（service crond restart）</p>\\\n<blockquote style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;quotes:none;margin-bottom:1.5em;font-style:italic;border-left:5px solid;margin-left:2em;padding-left:1em;\\\"><span style=\\\"font:inherit;quotes:none;font-style:italic;\\\"></span><p style=\\\"margin-bottom:0px;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\">注意：最好执行 service crond status 检查 crond 服务是否启动，service crond start 可手动启动，或者设置开机启动：chkconfig --level 35 crond on。Centos 7 x86_64 实测通过。</p><span style=\\\"font:inherit;quotes:none;font-style:italic;\\\"></span></blockquote>\\\n<h2 style=\\\"font-family:&quot;PT Serif&quot;;text-align:left;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;font-weight:bold;font-size:30px;line-height:35px;margin-top:35px;margin-bottom:15px;\\\">参考资料</h2>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">矢澤にこ - <a href=\\\"https://blog.ni-co.moe/public/509.html\\\" style=\\\"color:rgb(6, 85, 136);margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;text-decoration:none;\\\" target=\\\"_blank\\\">使用 rclone 将文件同步至 Google Dirve</a></p>\\\n<p style=\\\"margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">看天博客 - <a href=\\\"http://hi.ktsee.com/646.html\\\" style=\\\"color:rgb(6, 85, 136);margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;text-decoration:none;\\\" target=\\\"_blank\\\">rclone 定时自动备份 VPS 服务器上网站数据到网盘</a></p>\\\n<p style=\\\"margin-bottom:0px;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\">Leonn - <a href=\\\"https://blog.liyuans.com/archives/rclone.html\\\" style=\\\"color:rgb(6, 85, 136);margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;text-decoration:none;\\\" target=\\\"_blank\\\">Rclone: 超好用的网盘 / VPS 数据同步、备份工具，支持 Google Drive</a></p>\\\n\\t\\t\\t</div></div></div><div style=\\\"position:absolute;top:-1000px;left:-1000px;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;margin-bottom:1.5em;\\\">Measure</div><div style=\\\"margin-bottom:0px;position:absolute;top:-1000px;left:-1000px;line-height:1;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;\\\">Measure</div></div></div></div><div style=\\\"background-color:rgb(243, 242, 238);z-index:100;position:fixed;top:0px;right:0px;width:100%;height:100%;margin:0px;padding:0px;border:0px;font:inherit;vertical-align:baseline;display:none;\\\"></div></div></div></div></div>\\\n</div>\\\n</span>\\\n</div></body></html>\\u0000\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":28370}]"
metadata_diff: {"new":{"id":"4a0ad90f3184444397e656dd28e97300","parent_id":"061de1401cfc4cfaadf6e74e015970e9","latitude":"0.00000000","longitude":"0.00000000","altitude":"0.0000","author":"","source_url":"","is_todo":0,"todo_due":0,"todo_completed":0,"source":"joplin-desktop","source_application":"net.cozic.joplin-desktop","application_data":"","order":1764345824192,"markup_language":2,"is_shared":0,"share_id":"","conflict_original_id":"","master_key_id":"","user_data":"","deleted_time":0},"deleted":[]}
encryption_cipher_text: 
encryption_applied: 0
updated_time: 2025-11-28T16:20:18.784Z
created_time: 2025-11-28T16:20:18.784Z
type_: 13