<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:wfw="http://wellformedweb.org/CommentAPI/">
<channel>
<title>Eric&#039;s Blog - 网盘相关</title>
<link>https://eblog.ink/category/%E7%BD%91%E7%9B%98%E7%9B%B8%E5%85%B3/</link>
<atom:link href="https://eblog.ink/feed/category/%E7%BD%91%E7%9B%98%E7%9B%B8%E5%85%B3/" rel="self" type="application/rss+xml" />
<language>zh-CN</language>
<description></description>
<lastBuildDate>Tue, 01 Sep 2020 06:00:00 +0000</lastBuildDate>
<pubDate>Tue, 01 Sep 2020 06:00:00 +0000</pubDate>
<item>
<title>Linux 搭建谷歌gd-utils自己搭建过程</title>
<link>https://eblog.ink/archives/245/</link>
<guid>https://eblog.ink/archives/245/</guid>
<pubDate>Tue, 01 Sep 2020 06:00:00 +0000</pubDate>
<dc:creator>eric</dc:creator>
<description><![CDATA[1.准备工作：谷歌服务器一台域名一个并NS到CF创建一个TG机器人（BotFather ）团队盘一个2.域名通过CF解析到服务器ssl改为灵活自动代理3.使用一键安装部署脚本一键脚本使用方法：只...]]></description>
<content:encoded xml:lang="zh-CN"><![CDATA[
<p>1.准备工作：</p><pre><code>谷歌服务器一台
域名一个并NS到CF
创建一个TG机器人（BotFather ）
团队盘一个

</code></pre><p>2.域名通过CF解析到服务器</p><p>ssl改为灵活<br>自动代理</p><p>3.使用一键安装部署脚本<br>一键脚本使用方法：<br>只需复制以下链接到VPS命令行窗口粘贴回车即可以执行<br>gdutils项目一键部署脚本（包括“查询转存”和“TG机器人”两部分）</p><pre><code>bash -c &quot;$(curl -fsSL https://raw.githubusercontent.com/Eric-Qiu1994/gd-utils/master/gdutilsinstall.sh)&quot;
</code></pre><p>gdutils项目一键部署脚本之“转存查询部分”</p><pre><code>bash -c &quot;$(curl -fsSL https://raw.githubusercontent.com/Eric-Qiu1994/gd-utils/master/gdutilscsinstall.sh)&quot;
</code></pre><p>gdutils项目一键部署脚本之“TG机器人部分”</p><pre><code>bash -c &quot;$(curl -fsSL https://raw.githubusercontent.com/Eric-Qiu1994/gd-utils/master/gdutilsbotinstall.sh)&quot;

</code></pre><p>4.获取SA</p><pre><code>sudo git clone https://github.com/Eric-Qiu1994/AutoRclone &amp;&amp; cd AutoRclone &amp;&amp; sudo pip3 install -r requirements.txt
</code></pre><p>5.生成service accounts</p><p>开启<a href="https://developers.google.com/drive/api/v3/quickstart/python">Drive API</a></p><p>如果你之前没创建过项目, 直接运行</p><pre><code>python3 gen_sa_accounts.py --quick-setup 5
</code></pre><p>创建6个项目（项目0到项目5）<br>开启相关的服务<br>创建600个service accounts（6个项目，每个项目100个）<br>将600个service accounts的授权文件下载到accounts文件夹下面<br>如果你已经有N个项目，现需要创建新的项目并在新的项目中创建service accounts，直接运行</p><pre><code>python3 gen_sa_accounts.py --quick-setup 2 --new-only
</code></pre><p>额外创建2个项目（项目N+1到项目N+2）<br>开启相关的服务<br>创建200个service accounts（2个项目，每个项目100个）<br>将200个service accounts的授权文件下载到accounts文件夹下面<br>如果你想用已有的项目来创建service accounts（不创建新的项目），直接运行</p><pre><code>python3 gen_sa_accounts.py --quick-setup -1
</code></pre><p>注意这会覆盖掉已有的service accounts<br>顺利完成后，AutoRclone文件下面的accounts文件夹下会有很多的json文件。</p><p>如果遇到问题进项目管理点击后面的三个点儿，选择设置，然后把每一个项目里面的服务号全部删掉 <a href="https://console.developers.google.com/cloud-resource-manager?previousPage=%2Fiam-admin%2Fsettings%3Fproject%3Dquickstart-1589862574524%26supportedpurview%3Dproject&project=quickstart-1589862574524&supportedpurview=project">项目管理连接</a></p><p>把生成的这些.json文件复制到sa目录</p><p>6.把Json文件转换为邮箱</p><pre><code>https://raw.githubusercontent.com/Eric-Qiu1994/A-python-script-of-AutoRclone-or-gclone/master/mail.py
</code></pre><p>通过python3转换为txt</p><p>7.创建谷歌群组<br><a href="https://groups.google.com/">谷歌群组连接</a></p><p>把邮箱加入到新建的谷歌群组内（每天限制加入100个）</p><p><strong>注意：</strong><br>在 gd-utils 目录下，执行 git pull 拉取最新代码，如果你使用了 pm2 守护进程，执行pm2 reload server刷新生效</p>
]]></content:encoded>
<slash:comments>0</slash:comments>
<comments>https://eblog.ink/archives/245/#comments</comments>
<wfw:commentRss>https://eblog.ink/feed/category/%E7%BD%91%E7%9B%98%E7%9B%B8%E5%85%B3/</wfw:commentRss>
</item>
<item>
<title>Onedrive+OneManager+Heroku+CFWorkers 羊毛衫新织法</title>
<link>https://eblog.ink/archives/244/</link>
<guid>https://eblog.ink/archives/244/</guid>
<pubDate>Sun, 30 Aug 2020 02:09:00 +0000</pubDate>
<dc:creator>eric</dc:creator>
<description><![CDATA[Demo，不放。网站下载链接直接是xxx.com/abc.jpg，没有302跳到微软xxx.sharepoint.com，也没有反代xxx.sharepoint.com那样后面一长串。准备工作：...]]></description>
<content:encoded xml:lang="zh-CN"><![CDATA[
<p>Demo，不放。<br>网站下载链接直接是xxx.com/abc.jpg，没有302跳到微软xxx.sharepoint.com，也没有反代xxx.sharepoint.com那样后面一长串。</p><p>准备工作：<br>1，        Onedrive，或Sharepoint<br>这个大家有的，各种A1，E3，E5，世纪。（Sharepoint默认25T）<br>2，        OneManager，Github地址：<a href="https://github.com/qkqpttgf/OneManager-php">https://github.com/qkqpttgf/OneManager-php</a><br>基于各种无服务器的平台，比如Heroku、腾讯SCF、阿里FC、华为FG、百度CFC，配置都保存在其环境变量中，当然也可以装在VPS与空间里，不过为了一致，程序不固定储存onedrive的目录结构，缓存最多1小时<br>3，        Heroku，最好需要注册2个帐号，注册与登录时需要魔法，平时操作时不需要<br>OneManager配置是保存在环境变量中的，所以不需要一直监控保活，Heroku免费套餐每月550小时，550小时/30天=18.33小时，每天只要访问时间段空出来24-18=6小时没有人访问，这一个月其实就足够使用了，但有些人的网站可能访问人比较多所以还没到月底就用光了。<br>当然，heroku也可绑卡达到1000小时，同时还能自定义域名。但，SSL却比较麻烦。<br>4，        CF workers，免费的就好</p><p>部署程序、安装程序、绑定网盘：<br>1，        将OneManager一键部署到Heroku<br>2，        访问给定的herokuapp域名，正式安装好程序<br>3，        安装好后登录，在设置中绑定Onedrive或Sharepoint<br>4，        在设置中做些设定<br>5，        换一个Heroku帐号再安装一次（时长够用就无所谓）</p><p>重点：<br>在CF Workers中填入以下代码</p><pre><code>// 单日
const SingleDay = &#039;111.herokuapp.com&#039;
// 双日
const DoubleDay = &#039;222.herokuapp.com&#039;
// 一切给CF代理，true/false
const CFproxy = true

// 由于heroku不绑卡不能自定义域名，就算绑卡后https也不方便
// 另外免费套餐每月550小时，有些人不够用
// 于是在CF Workers使用此代码，分单双日拉取不同heroku帐号下的相同网页
// 只改上面，下面不用动

addEventListener(&#039;fetch&#039;, event =&gt; {
    let nd = new Date();
    if (nd.getDate()%2) {
        host = SingleDay
    } else {
        host = DoubleDay
    }
    if (!CFproxy) {
        let url=new URL(event.request.url);
        if (url.protocol == &#039;http:&#039;) {
            url.protocol = &#039;https:&#039;
            response = Response.redirect(url.href);
            event.respondWith( response );
        } else {
            url.hostname=host;
            let request=new Request(url,event.request);
            event.respondWith( fetch(request) )
        }
    } else {
        event.respondWith( fetchAndApply(event.request) );
    }
})

async function fetchAndApply(request) {
    let response = null;
    let url = new URL(request.url);
    if (url.protocol == &#039;http:&#039;) {
        url.protocol = &#039;https:&#039;
        response = Response.redirect(url.href);
        return response;
    }
    url.host = host;

    let method = request.method;
    let body = request.body;
    let request_headers = request.headers;
    let new_request_headers = new Headers(request_headers);

    new_request_headers.set(&#039;Host&#039;, url.host);
    new_request_headers.set(&#039;Referer&#039;, request.url);

    let original_response = await fetch(url.href, {
        method: method,
        body: body,
        headers: new_request_headers
    });

    response = new Response(original_response.body, {
        status: original_response.status,
        headers: original_response.headers
    })

    return response;
}
</code></pre><p>单双日分别填入不同的heroku帐号下的网站（当然2个网站要设置得一模一样），这样每个heroku帐号每个月都只访问15或16天，就算24小时有人访问也才360或384小时。<br>最后，给workers加上自定义域名的路由！</p><p>从头到尾都可以是Free的，不看网站页面，光从下载过程来看，可以完全假装CF套在了大盘鸡上,谁也看不出我没服务器.</p><p><a href="https://www.hostloc.com/thread-737360-1-1.html">原文链接</a></p>
]]></content:encoded>
<slash:comments>0</slash:comments>
<comments>https://eblog.ink/archives/244/#comments</comments>
<wfw:commentRss>https://eblog.ink/feed/category/%E7%BD%91%E7%9B%98%E7%9B%B8%E5%85%B3/</wfw:commentRss>
</item>
<item>
<title>使用 rclone 将 Google Drive 文件同步至 OneDrive</title>
<link>https://eblog.ink/archives/234/</link>
<guid>https://eblog.ink/archives/234/</guid>
<pubDate>Fri, 10 Jul 2020 02:45:00 +0000</pubDate>
<dc:creator>eric</dc:creator>
<description><![CDATA[Google 虽然是大厂，但是数据只有一份，还是怕怕，多一个备份不是坏事。苹果 iCloud 不错，但是贼贵，况且我只有一个进过水的 SE……那就 OneDrive 吧，Office 365 就...]]></description>
<content:encoded xml:lang="zh-CN"><![CDATA[
<p>Google 虽然是大厂，但是数据只有一份，还是怕怕，多一个备份不是坏事。苹果 iCloud 不错，但是贼贵，况且我只有一个进过水的 SE……</p><p>那就 OneDrive 吧，Office 365 就有 1T，前阵子在老司机群看到博友合租 Office 365 家庭套餐，还挺划算的，于是就上车了。</p><p>1.1 rclone 安装<br>执行命令：curl <a href="https://rclone.org/install.sh">https://rclone.org/install.sh</a> | sudo bash</p><p>1.2 连接网盘<br>连接 Google Drive，执行命令进入配置菜单：rclone config</p><p>1.3 初次进入会有如下菜单提示：</p><pre><code>#~:rclone config
No remotes found - make a new one
n) New remote -&gt; 连接新远程网盘
s) Set configuration password -&gt; 设置密码保护配置信息
q) Quit config -&gt; 退出
n/s/q&gt;
</code></pre><p>1.4 需要加密码保护配置信息就按 s 进入设置密码，若不需要，按 n 进入连接网盘。</p><pre><code>n/s/q&gt; n
name&gt; gdrive -&gt; 网盘名字，写一个方便自己识别的名字就好
Type of storage to configure.
Enter a string value. Press Enter for the default (&quot;&quot;).
Choose a number from below, or type in your own value
 1 / Alias for a existing remote
   \ &quot;alias&quot;
 2 / Amazon Drive
   \ &quot;amazon cloud drive&quot;
 3 / Amazon S3 Compliant Storage Providers (AWS, Ceph, Dreamhost, IBM COS, Minio)
   \ &quot;s3&quot;
 4 / Backblaze B2
   \ &quot;b2&quot;
 5 / Box
   \ &quot;box&quot;
 6 / Cache a remote
   \ &quot;cache&quot;
 7 / Dropbox
   \ &quot;dropbox&quot;
 8 / Encrypt/Decrypt a remote
   \ &quot;crypt&quot;
 9 / FTP Connection
   \ &quot;ftp&quot;
10 / Google Cloud Storage (this is not Google Drive)
   \ &quot;google cloud storage&quot;
11 / Google Drive
   \ &quot;drive&quot;
12 / Hubic
   \ &quot;hubic&quot;
13 / JottaCloud
   \ &quot;jottacloud&quot;
14 / Local Disk
   \ &quot;local&quot;
15 / Mega
   \ &quot;mega&quot;
16 / Microsoft Azure Blob Storage
   \ &quot;azureblob&quot;
17 / Microsoft OneDrive
   \ &quot;onedrive&quot;
18 / OpenDrive
   \ &quot;opendrive&quot;
19 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
   \ &quot;swift&quot;
20 / Pcloud
   \ &quot;pcloud&quot;
21 / QingCloud Object Storage
   \ &quot;qingstor&quot;
22 / SSH/SFTP Connection
   \ &quot;sftp&quot;
23 / Webdav
   \ &quot;webdav&quot;
24 / Yandex Disk
   \ &quot;yandex&quot;
25 / http Connection
   \ &quot;http&quot;
Storage&gt; 11 -&gt; 11 是 Google Drive
Google Application Client Id
Leave blank normally.
Enter a string value. Press Enter for the default (&quot;&quot;).
client_id&gt; -&gt; 留空，按回车下一步就好
Google Application Client Secret
Leave blank normally.
Enter a string value. Press Enter for the default (&quot;&quot;).
client_secret&gt; -&gt; 留空，按回车下一步就好
Scope that rclone should use when requesting access from drive.
Enter a string value. Press Enter for the default (&quot;&quot;).
Choose a number from below, or type in your own value
 1 / Full access all files, excluding Application Data Folder.
   \ &quot;drive&quot;
 2 / Read-only access to file metadata and file contents.
   \ &quot;drive.readonly&quot;
   / Access to files created by rclone only.
 3 | These are visible in the drive website.
   | File authorization is revoked when the user deauthorizes the app.
   \ &quot;drive.file&quot;
   / Allows read and write access to the Application Data folder.
 4 | This is not visible in the drive website.
   \ &quot;drive.appfolder&quot;
   / Allows read-only access to file metadata but
 5 | does not allow any access to read or download file content.
   \ &quot;drive.metadata.readonly&quot;
scope&gt; 2 -&gt; 1 是拥有所有权限，包括删除；2 是只能访问所有文件，不能删除，按需要选择吧
ID of the root folder
Leave blank normally.
Fill in to access &quot;Computers&quot; folders. (see docs).
Enter a string value. Press Enter for the default (&quot;&quot;).
root_folder_id&gt; -&gt; 留空，按回车下一步就好
Service Account Credentials JSON file path
Leave blank normally.
Needed only if you want use SA instead of interactive login.
Enter a string value. Press Enter for the default (&quot;&quot;).
service_account_file&gt; -&gt; 留空，按回车下一步就好
Edit advanced config? (y/n)
y) Yes
n) No
y/n&gt; n -&gt; 一般不需要高级设置，选择 n 就好
Remote config
Use auto config?
 * Say Y if not sure
 * Say N if you are working on a remote or headless machine or Y didn&#039;t work
y) Yes
n) No
y/n&gt; n -&gt; 如果是在 VPS 上连接，选 n 吧
If your browser doesn&#039;t open automatically go to the following link: https://accounts.google.com/o/oauth2/auth?access_type=offline&amp;client_id=**************************************
Log in and authorize rclone for access
Enter verification code&gt; **************zN5****vd5*******************bwZethESs
Configure this as a team drive?
y) Yes
n) No
y/n&gt; n
--------------------
[remote]
client_id = 
client_secret = 
scope = drive
root_folder_id = 
service_account_file =
token = {&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;}
--------------------
y) Yes this is OK
e) Edit this remote
d) Delete this remote
y/e/d&gt; y
</code></pre><p>1.5 Google Drive 连接完成，可以执行命令检查一下是否真的能连接上：</p><pre><code>#列出顶级文件夹，（gdrive 是前面第一步设置的名字，如果配置设置了密码会提示输入密码）
rclone lsd gdrive:

#列出所有文件
rclone ls gdrive:
</code></pre><p>1.6 连接 OneDrive，方法类似，命令进入配置：rclone config</p><pre><code>#~:rclone config
No remotes found - make a new one
n) New remote
s) Set configuration password
q) Quit config
n/s/q&gt; n
name&gt; onedrive
Type of storage to configure.
Enter a string value. Press Enter for the default (&quot;&quot;).
Choose a number from below, or type in your own value
 1 / Alias for a existing remote
   \ &quot;alias&quot;
 2 / Amazon Drive
   \ &quot;amazon cloud drive&quot;
 3 / Amazon S3 Compliant Storage Providers (AWS, Ceph, Dreamhost, IBM COS, Minio)
   \ &quot;s3&quot;
 4 / Backblaze B2
   \ &quot;b2&quot;
 5 / Box
   \ &quot;box&quot;
 6 / Cache a remote
   \ &quot;cache&quot;
 7 / Dropbox
   \ &quot;dropbox&quot;
 8 / Encrypt/Decrypt a remote
   \ &quot;crypt&quot;
 9 / FTP Connection
   \ &quot;ftp&quot;
10 / Google Cloud Storage (this is not Google Drive)
   \ &quot;google cloud storage&quot;
11 / Google Drive
   \ &quot;drive&quot;
12 / Hubic
   \ &quot;hubic&quot;
13 / JottaCloud
   \ &quot;jottacloud&quot;
14 / Local Disk
   \ &quot;local&quot;
15 / Mega
   \ &quot;mega&quot;
16 / Microsoft Azure Blob Storage
   \ &quot;azureblob&quot;
17 / Microsoft OneDrive
   \ &quot;onedrive&quot;
18 / OpenDrive
   \ &quot;opendrive&quot;
19 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
   \ &quot;swift&quot;
20 / Pcloud
   \ &quot;pcloud&quot;
21 / QingCloud Object Storage
   \ &quot;qingstor&quot;
22 / SSH/SFTP Connection
   \ &quot;sftp&quot;
23 / Webdav
   \ &quot;webdav&quot;
24 / Yandex Disk
   \ &quot;yandex&quot;
25 / http Connection
   \ &quot;http&quot;
Storage&gt; 17
Microsoft App Client Id
Leave blank normally.
Enter a string value. Press Enter for the default (&quot;&quot;).
client_id&gt;
Microsoft App Client Secret
Leave blank normally.
Enter a string value. Press Enter for the default (&quot;&quot;).
client_secret&gt;
Edit advanced config? (y/n)
y) Yes
n) No
y/n&gt; n
Remote config
Choose OneDrive account type?
 * Say b for a OneDrive business account -&gt; b 商业版
 * Say p for a personal OneDrive account -&gt; p 个人版
b) Business
p) Personal
b/p&gt; p
Use auto config?
 * Say Y if not sure
 * Say N if you are working on a remote or headless machine
y) Yes
n) No
y/n&gt; n
For this to work, you will need rclone available on a machine that has a web browser available.
Execute the following on your machine:
        rclone authorize &quot;onedrive&quot;
Then paste the result below:（需要在能打开浏览器的电脑上获取，方法见下面：OneDrive 授权码获取方法）
result&gt;{&quot;access_token&quot;:&quot;$$$$$$$$$$$$$$&quot;,&quot;expiry&quot;:&quot;2018-09-03T08:43:55.5290909+08:00&quot;}
2018/09/03 07:47:11 ERROR : Failed to save new token in config file: section &#039;onedrive&#039; not found
--------------------
[onedrive]
type = onedrive
token = {&quot;access_token&quot;:&quot;$$$$$$$$$$$$$$&quot;,&quot;expiry&quot;:&quot;2018-09-01T08:43:55.5290909+08:00&quot;}
--------------------
y) Yes this is OK
e) Edit this remote
d) Delete this remote
y/e/d&gt; y
Current remotes:

Name                 Type
====                 ====
onedrive             onedrive

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&gt; q
</code></pre><p>1.7 OneDrive 授权码获取方法：</p><p>官网下载 rclone Windows 版，地址：<a href="https://rclone.org/downloads/">https://rclone.org/downloads/</a></p><p>如 Rclone Download v1.43 Windows 64 位：<a href="https://downloads.rclone.org/v1.43/rclone-v1.43-windows-amd64.zip">https://downloads.rclone.org/v1.43/rclone-v1.43-windows-amd64.zip</a>，解压到 C 盘根目录，文件夹重命名为 rc，然后参考下面方法即可获取授权。</p><pre><code>Microsoft Windows [版本 10.0.14393]
(c) 2016 Microsoft Corporation。保留所有权利。
C:\Users\Administrator&gt;cd c:\rc
c:\rc&gt;rclone authorize &quot;onedrive&quot;  -·-·- （PowerShell 可能需要使用此命令：.\rclone authorize &quot;onedrive&quot;）
Choose OneDrive account type?
 * Say b for a OneDrive business account
 * Say p for a personal OneDrive account
b) Business
p) Personal
b/p&gt; p
If your browser doesn&#039;t open automatically go to the following link: http://127.0.0.1:53682/auth
Log in and authorize rclone for access
Waiting for code...
Got code
Paste the following into your remote machine ---&gt;
{&quot;access_token&quot;:&quot;***************########################################################################################################################**************************************************************************************************************************************************************************************************************$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$&quot;,&quot;expiry&quot;:&quot;2018-09-01T01:43:55.5290909+08:00&quot;}
&lt;---End paste
</code></pre><p>然后将 { } 内的内容（包括{}）复制到前面 result&gt; 后面，回车即可。</p><p>同样，执行 ls 或者 lsd 命令检查是否连接成功：</p><pre><code>#列出顶级文件夹，（gdrive 是前面第一步设置的名字，如果配置设置了密码会提示输入密码）
rclone lsd onedrive:

#列出所有文件
rclone ls onedrive:

</code></pre><p>2.1 定时执行脚本 rclone 命令大全</p><p>如果用来备份或者同步文件，用到的命令可能就两个：rclone_copy 和 rclone_sync。</p><p>rclone_copy 是复制，配合附加参数 --ignore-existing 可以假装增量备份；</p><p>rclone_sync 是源目录同步到目标目录，使两者一致，会删除目标目录多余内容，测试时可以加上 --dry-run，检查会复制和删除那些文件。</p><pre><code>rclone about - Get quota information from the remote.
rclone authorize - Remote authorization.
rclone cachestats - Print cache stats for a remote
rclone cat - Concatenates any files and sends them to stdout.
rclone check - Checks the files in the source and destination match.
rclone cleanup - Clean up the remote if possible
rclone config - Enter an interactive configuration session.
rclone copy - Copy files from source to dest, skipping already copied
rclone copyto - Copy files from source to dest, skipping already copied
rclone copyurl - Copy url content to dest.
rclone cryptcheck - Cryptcheck checks the integrity of a crypted remote.
rclone cryptdecode - Cryptdecode returns unencrypted file names.
rclone dbhashsum - Produces a Dropbox hash file for all the objects in the path.
rclone dedupe - Interactively find duplicate files and delete/rename them.
rclone delete - Remove the contents of path.
rclone deletefile - Remove a single file from remote.
rclone genautocomplete - Output completion script for a given shell.
rclone gendocs - Output markdown docs for rclone to the directory supplied.
rclone hashsum - Produces an hashsum file for all the objects in the path.
rclone link - Generate public link to file/folder.
rclone listremotes - List all the remotes in the config file.
rclone ls - List the objects in the path with size and path.
rclone lsd - List all directories/containers/buckets in the path.
rclone lsf - List directories and objects in remote:path formatted for parsing
rclone lsjson - List directories and objects in the path in JSON format.
rclone lsl - List the objects in path with modification time, size and path.
rclone md5sum - Produces an md5sum file for all the objects in the path.
rclone mkdir - Make the path if it doesn’t already exist.
rclone mount - Mount the remote as a mountpoint. EXPERIMENTAL
rclone move - Move files from source to dest.
rclone moveto - Move file or directory from source to dest.
rclone ncdu - Explore a remote with a text based user interface.
rclone obscure - Obscure password for use in the rclone.conf
rclone purge - Remove the path and all of its contents.
rclone rc - Run a command against a running rclone.
rclone rcat - Copies standard input to file on remote.
rclone rmdir - Remove the path if empty.
rclone rmdirs - Remove empty directories under the path.
rclone serve - Serve a remote over a protocol.
rclone sha1sum - Produces an sha1sum file for all the objects in the path.
rclone size - Prints the total size and number of objects in remote:path.
rclone sync - Make source and dest identical, modifying destination only.
rclone touch - Create new file or change file modification time.
rclone tree - List the contents of the remote in a tree like fashion.
rclone version - Show the version number.
</code></pre><p>保证数据不会中断</p><pre><code>yum install screen
screen -S rclone #第一次同步大量数据使用 screen 会话尽可能保护 rclone 执行不被中断
rclone copy gdrive:GooglePhotos onedrive:GooglePhotos
</code></pre><p>第一次同步完成，就可以 VPS 上（每天/周/月，按需选择）定时执行脚本自动同步。可以选择使用 rclone_copy --ignore-existing 进行增量备份（没有实测，按官方说明是可以实现），或者使用 rclone sync 同步。</p><p>我希望 OneDrive 上的备份与 Google Drive 一致，所以每天定时执行 rclone sync gdrive:GooglePhotos onedrive:GooglePhotos</p><pre><code>/usr/bin/rclone sync gdrive:GooglePhotos onedrive:GooglePhotos &gt;&gt; /root/rclone.log 2&gt;&amp;1
</code></pre><p>配合 crontab 定时执行，比如每天 4:44 执行一次，日志写到 /root/rclone.log。执行 crontab -e，i，添加下面代码进去，按一下 Esc，然后输入 :wq 回车保存退出。</p><pre><code>44 4 * * * /usr/bin/rclone sync gdrive:GooglePhotos onedrive:GooglePhotos &gt;&gt; /root/rclone.log 2&gt;&amp;1
</code></pre><p>注：不需要日志的话把 &gt;&gt; /root/rclone.log 2&gt;&1 去掉。</p><p>然后重启一下 crond 服务即可。（service crond restart）</p><pre><code>注意：最好执行 service crond status 检查 crond 服务是否启动，service crond start 可手动启动，或者设置开机启动：chkconfig --level 35 crond on。Centos 7 x86_64 实测通过。
</code></pre><p><a href="https://cyhour.com/825/">原文链接</a></p>
]]></content:encoded>
<slash:comments>0</slash:comments>
<comments>https://eblog.ink/archives/234/#comments</comments>
<wfw:commentRss>https://eblog.ink/feed/category/%E7%BD%91%E7%9B%98%E7%9B%B8%E5%85%B3/</wfw:commentRss>
</item>
<item>
<title>Goo Driver 突破750G拷贝限制</title>
<link>https://eblog.ink/archives/219/</link>
<guid>https://eblog.ink/archives/219/</guid>
<pubDate>Tue, 02 Jun 2020 02:04:00 +0000</pubDate>
<dc:creator>eric</dc:creator>
<description><![CDATA[1.打开 笔记 点击打开2.点击左上角File ———— upload notebook————选择解压出来的额750G.ipynb备注：文件地址下载解压3.上传成功以后根据提示就可以了注意 第...]]></description>
<content:encoded xml:lang="zh-CN"><![CDATA[
<p>1.打开 笔记 <a href="https://colab.research.google.com/notebooks/intro.ipynb">点击打开</a></p><p>2.点击左上角File ———— upload notebook————选择解压出来的额750G.ipynb</p><p>备注：<a href="https://lanzous.com/id8qs9e">文件地址下载解压</a></p><p>3.上传成功以后根据提示就可以了</p><p>注意 第二次使用：</p><p>1.<a href="https://drive.google.com">打开链接</a></p><p>2.找到Colab Notebooks文件夹打开</p><p>3.右键750G.ipynb 打开方式选择 Colaboratory</p><p>4.执行 第一步  第三步 和拉倒最下面一步</p>
]]></content:encoded>
<slash:comments>0</slash:comments>
<comments>https://eblog.ink/archives/219/#comments</comments>
<wfw:commentRss>https://eblog.ink/feed/category/%E7%BD%91%E7%9B%98%E7%9B%B8%E5%85%B3/</wfw:commentRss>
</item>
<item>
<title>GoIndex 索引之PC获取Token</title>
<link>https://eblog.ink/archives/218/</link>
<guid>https://eblog.ink/archives/218/</guid>
<pubDate>Tue, 19 May 2020 13:23:00 +0000</pubDate>
<dc:creator>eric</dc:creator>
<description><![CDATA[1.获取PC版本Rclone 下载地址2.解压文件，cmd前往rclone的目录3.开始配置#打开菜单rclone config#新增远程n#输入名字（随便填）Goo#选择GoogleDrive...]]></description>
<content:encoded xml:lang="zh-CN"><![CDATA[
<p>1.获取PC版本Rclone <a href="https://rclone.org/downloads/">下载地址</a></p><p>2.解压文件，cmd前往rclone的目录</p><p>3.开始配置</p><pre><code>#打开菜单
rclone config
#新增远程
n
#输入名字（随便填）
Goo
#选择GoogleDrive
13
#client_id保持默认
回车
#client_secret保持默认
回车
#赋予全部权限
1
#root_folder_id保持默认
回车
#service_account_file保持默认
回车
#不编辑高级参数
n
#使用自动config，并在弹出的网页登陆
y
#是否添加为团队盘
n
#确认参数正确
y
</code></pre><p>配置完成后输入 rclone config file 查看配置文件目录</p><p>然后使用notepad++打开文件查看1/开头的  就是token了</p>
]]></content:encoded>
<slash:comments>0</slash:comments>
<comments>https://eblog.ink/archives/218/#comments</comments>
<wfw:commentRss>https://eblog.ink/feed/category/%E7%BD%91%E7%9B%98%E7%9B%B8%E5%85%B3/</wfw:commentRss>
</item>
<item>
<title>GoIndex 索引之创建Workers</title>
<link>https://eblog.ink/archives/217/</link>
<guid>https://eblog.ink/archives/217/</guid>
<pubDate>Tue, 19 May 2020 13:22:00 +0000</pubDate>
<dc:creator>eric</dc:creator>
<description><![CDATA[1.登陆cloudflare2.点击右边的Workers3.点击创建4.把index.js文件里面的所有内容都复制粘贴到左边脚本里面文件地址 密码:diqh5.网站名称、密码、Token就是上一...]]></description>
<content:encoded xml:lang="zh-CN"><![CDATA[
<p>1.登陆<a href="https://cloudflare.com/">cloudflare</a></p><p>2.点击右边的Workers</p><p>3.点击创建</p><p>4.把index.js文件里面的所有内容都复制粘贴到左边脚本里面<a href="https://lanzous.com/ict3s8f">文件地址</a> 密码:diqh</p><p>5.网站名称、密码、Token就是上一篇文章获取到的1/开头的</p><p>6.根目录ID为你go网盘的xxxxxxxxxxxxx<br>例如： <a href="https://drive.google.com/drive/folders/xxxxxxxxxxxxx">https://drive.google.com/drive/folders/xxxxxxxxxxxxx</a></p><p>7.确定都正确以后点击保存并部署</p>
]]></content:encoded>
<slash:comments>0</slash:comments>
<comments>https://eblog.ink/archives/217/#comments</comments>
<wfw:commentRss>https://eblog.ink/feed/category/%E7%BD%91%E7%9B%98%E7%9B%B8%E5%85%B3/</wfw:commentRss>
</item>
<item>
<title>GoIndex 索引之Centos获取token</title>
<link>https://eblog.ink/archives/216/</link>
<guid>https://eblog.ink/archives/216/</guid>
<pubDate>Tue, 19 May 2020 13:03:00 +0000</pubDate>
<dc:creator>eric</dc:creator>
<description><![CDATA[安装EPEL源yum -y install epel-releaseyum -y install wget unzip screen fuse fuse-develwget https://do...]]></description>
<content:encoded xml:lang="zh-CN"><![CDATA[
<h1>安装EPEL源</h1><pre><code>yum -y install epel-release
yum -y install wget unzip screen fuse fuse-devel
wget https://downloads.rclone.org/v1.40/rclone-v1.40-linux-amd64.zip
unzip rclone-v1.40-linux-amd64.zip
cd rclone-v1.40-linux-amd64
./rclone config
</code></pre><p>接下来就是选择</p><pre><code>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&gt; 
</code></pre><p>选择n</p><pre><code>name&gt; 
</code></pre><p>随便输入</p><pre><code>   \ &quot;google cloud storage&quot;
11 / Google Drive
   \ &quot;drive&quot;</code></pre><p>Storage选择google 对应的数字</p><pre><code>client_id&gt; 回车

client_secret&gt; 回车

 1 / Full access all files, excluding Application Data Folder.
   \ &quot;drive&quot;
 2 / Read-only access to file metadata and file contents.
   \ &quot;drive.readonly&quot;
   / Access to files created by rclone only.
 3 | These are visible in the drive website.
   | File authorization is revoked when the user deauthorizes the app.
   \ &quot;drive.file&quot;
   / Allows read and write access to the Application Data folder.
 4 | This is not visible in the drive website.
   \ &quot;drive.appfolder&quot;
   / Allows read-only access to file metadata but
 5 | does not allow any access to read or download file content.
   \ &quot;drive.metadata.readonly&quot;
</code></pre><p>scope&gt; 选择1</p><pre><code>root_folder_id&gt;回车

service_account_file&gt; 回车

Use auto config?
 * Say Y if not sure
 * Say N if you are working on a remote or headless machine or Y didn&#039;t work
y) Yes
n) No
y/n&gt;选择n

If your browser doesn&#039;t open automatically go to the following link: https://accounts.google.com/o/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Log in and authorize rclone for access
Enter verification code&gt;这里输入复制上方的网址打开后获得的4/开头的码

configure this as a team drive?
y)yes
n)no
y/n)如果出现这个选择n
</code></pre><p>完成后输入</p><pre><code>./rclone config file</code></pre><p>获取完成后输入</p><pre><code>vi ~/config/rclone/rclone.conf
</code></pre><p>获取到1/开头的就是token了</p>
]]></content:encoded>
<slash:comments>0</slash:comments>
<comments>https://eblog.ink/archives/216/#comments</comments>
<wfw:commentRss>https://eblog.ink/feed/category/%E7%BD%91%E7%9B%98%E7%9B%B8%E5%85%B3/</wfw:commentRss>
</item>
</channel>
</rss>