百度网盘转存Google Drive


前言

14年左右百度网盘还处于初期的时候笔者向百度网盘上传了很多数据,到现在差不多有1.5T量的数据,怕之后需要的时候下载贼慢,于是产生了转存到自己的Google Workspace Enterprise中,因而去网上搜索+自己摸索了一下,整理出一套至少自用没问题的教程,供后来者参考。
理论来说并不仅限于Google Drive,只要支持挂载为本地硬盘的网盘(无论是第三方还是官方皆可)都行
感谢此博文提供的思路

提醒

  1. 此方法需要开启百度网盘的SVIP,目的是为了加速下载(当然,如果是数据量不大+不在意时间可以不用)
  2. 百度网盘存在下载阈值,即使是开启了SVIP的情况下,笔者一晚上转存了600G左右的数据就被限速。
  3. 此方法对于小文件极多(指文件夹内有1w+文件)的情况上传会很慢。
  4. 此方法过滤掉了大小为0的文件,如有需要请自寻方法。

    教程开始

    前置准备

  5. 一台ddwindows的机器(尽量不限流量+带宽200Mbps对等即可,内存4g够用,硬盘理论60G够用),用windows的目的是为了稳定,第三方以及Linux端的客户端会有些奇怪的bug
  6. 一个开启了SVIP的百度账号(当然,如果是数据量不大+不在意时间可以不用)。
  7. 机器尽量使用SSD,不然可能会影响上传速度。
  8. (可选)哪吒面板,以解决部分低配置机器百度网盘下载一会儿闪退的情况。

    1. DD Windows

    依赖安装

    #Debian/Ubuntu:
    apt-get update
    apt-get install -y xz-utils openssl gawk file
    
    #RedHat/CentOS:
    yum update
    yum install -y xz openssl gawk file

此处使用萌咖大佬的脚本
大多数机器补全dd包系统文件的地址运行如下脚本即可。
甲骨文,阿里云,Azure,GCP等需要补全参数,具体此处不再赘述,网上一堆教程。

wget --no-check-certificate -qO InstallNET.sh 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh' && bash InstallNET.sh -dd '[Windows DD包直链地址]'

如若自己没有DD包的链接,可使用笔者提供的文件,源自nat.ee
主要浏览文件夹内部的一键安装.txt与readme.txt!

  1. 12.23 由于Google Workspaceban了,以下包链接皆失效。

笔者dd包文件网页

部分dd包

# DD Windows Server 2008 R2 64位 精简版 [账户Administrator密码nat.ee]
wget --no-check-certificate -qO InstallNET.sh 'https://nat.xieshang.xyz/InstallNET.sh' && bash InstallNET.sh -dd 'https://nat.xieshang.xyz/win/lite/winsrv2008r2-data-x64-cn/winsrv2008r2-data-x64-cn.vhd.gz'

# DD Windows Server 2012 R2 64位 精简版 [账户Administrator密码nat.ee]
wget --no-check-certificate -qO InstallNET.sh 'https://nat.xieshang.xyz/InstallNET.sh' && bash InstallNET.sh -dd 'https://nat.xieshang.xyz/win/lite/winsrv2012r2-data-x64-cn/winsrv2012r2-data-x64-cn.vhd.gz'

# DD Windows Server 2016 64位 精简版 [账户Administrator密码nat.ee]
wget --no-check-certificate -qO InstallNET.sh 'https://nat.xieshang.xyz/InstallNET.sh' && bash InstallNET.sh -dd 'https://nat.xieshang.xyz/win/lite/winsrv2016-data-x64-cn/winsrv2016-data-x64-cn.vhd.gz'

# DD Windows Server 2022 64位 精简版 [账户Administrator密码nat.ee]
wget --no-check-certificate -qO InstallNET.sh 'https://nat.xieshang.xyz/InstallNET.sh' && bash InstallNET.sh -dd 'https://nat.xieshang.xyz/win/lite/winsrv2022-data-x64-cn/winsrv2022-data-x64-cn.vhd.gz'

# DD Windows7 32位 精简版 [账户Administrator密码nat.ee]
wget --no-check-certificate -qO InstallNET.sh 'https://nat.xieshang.xyz/InstallNET.sh' && bash InstallNET.sh -dd 'https://nat.xieshang.xyz/win/lite/wes7-x86-cn-lite/wes7-x86-cn-lite.vhd.gz'

# DD Windows7 sp1 64位 企业精简版 [账户Administrator密码nat.ee]
wget --no-check-certificate -qO InstallNET.sh 'https://nat.xieshang.xyz/InstallNET.sh' && bash InstallNET.sh -dd 'https://nat.xieshang.xyz/win/lite/win7-ent-sp1-x64-cn/win7-ent-sp1-x64-cn.vhd.gz'

# DD Windows10 2021LTSC 64位 企业深度精简版 [账户Administrator密码nat.ee]
wget --no-check-certificate -qO InstallNET.sh 'https://nat.xieshang.xyz/InstallNET.sh' && bash InstallNET.sh -dd 'https://nat.xieshang.xyz/win/guajibao/guajibao-win10-ent-ltsc-2021-x64-cn/guajibao-win10-ent-ltsc-2021-x64-cn.vhd.gz'

GCP安装

因为笔者此处用GCP进行演示(原因很简单,GCP入站流量不收费,出站到Google Drive不收费,新Google账号绑定信用卡有400刀免费额度),所以也演示下如何用GCP Debian 10 dd Windows系统。
--ip-addr后接内网ip,如下图。
内网ip
--ip-gate后接内网ip把最后一位改为1,如我的内网ip为10.170.0.3,则此处后接10.170.0.1.

wget --no-check-certificate -qO InstallNET.sh 'https://nat.xieshang.xyz/InstallNET.sh' && bash InstallNET.sh -dd 'https://nat.xieshang.xyz/win/guajibao/guajibao-win10-ent-ltsc-2021-x64-cn/guajibao-win10-ent-ltsc-2021-x64-cn.vhd.gz' --ip-addr X.X.X.X --ip-mask 255.255.255.0 --ip-gate X.X.X.X

然后到92851 blocks就自动断开SSH了,这时候就是已经在安装系统了。
建议DD完windows之后打个映像备份

2.安装软件

上一步进行完dd系统以及修改密码等操作之后进行软件安装。
Edge浏览器安装以及百度网盘安装不再赘述。

网盘挂载

此处以RaiDrive为例,官网下载安装包并安装,打开选择挂载Google Drive,如果是团队盘直接填链接即可(文件夹->蓝色的文件夹图标->共享链接->文本框填写团队盘链接即可),确定登录即可。
rclone挂载的话win端需要安装winfsp
新建记事本,将下面脚本复制进去,并将倒数第二行的name换成你配置drive时输入的名字,在你的硬盘中为rclone创建一个名为Temp的文件夹用于文件的上传缓存,最好不要是系统盘,然后将下文代码中Z:Temp\换成你创建的目录;保存该脚本并修改名字成rclone.vbs,然后双击打开就行了。

Option Explicit
Dim WMIService, Process, Processes, Flag, WS
Set WMIService = GetObject("winmgmts:{impersonationlevel=impersonate}!\\.\root\cimv2")
Set Processes = WMIService.ExecQuery("select * from win32_process")
Flag = true
for each Process in Processes
    if strcomp(Process.name, "rclone.exe") = 0 then
        Flag = false
        exit for
    end if
next
Set WMIService = nothing
if Flag then
    Set WS = Wscript.CreateObject("Wscript.Shell")
    WS.Run "rclone mount name: X: --cache-dir Z:Temp\ --allow-other --allow-non-empty --no-modtime --vfs-cache-mode writes --vfs-cache-max-age 10s --vfs-cache-poll-interval 5s --cache-tmp-wait-time 1s", 0
end if

具体挂载教程详见此博文

limagitoX安装

点击下载软件压缩包并解压
按照压缩包的说明进行破解。

limagitoX配置

1.点击Source→点击win
    选择本地百度网盘默认下载文件夹
2.点击File Filter → File Name → Exclude
    在File Filter as string填入以下内容
      *.downloading.cfg;*.downloading;
3.点击Dir Filter,选择以下内容
    Include Subdirectories
    Delete Empty subdirectories On Scan
4.点击function,选择以下内容
    Move Files
5.点击Destination
    选择挂载到本地的网盘文件夹
6.点击左上角运行按钮
    蓝色为激活状态,灰色为未激活
7.多任务配置(伪,并不能做到真正多任务)
    右键配置好的Rule,选择并确定Duplicate rule。
    每个RuleID的File Filter中的file size选项有梯度设置区间有区别。
    例如RuleID1区间为0-100M、RuleID2的区间为100M-500M、RuleID3区间为500M-15G
    这样保证大文件与小文件同等的被move、不会造成大文件的堆积。同时并行任务速度较快。

如果使用正常,就可以开启百度云下载了。

LimagitoXI报错

大概率是文件被百度p2p占用导致无法move,请在百度网盘设置→传输→高级设置→关闭用户激励计划。

解决百度网盘下载一段时间闪退问题

此问题笔者在使用修改版的百度网盘时遇到,想每15min重启一次百度网盘主程序,想法很美好,写好的restart.bat也能成功运行,restart.bat如下,将其放在你的百度网盘安装目录下。

taskkill /F /IM BaiduNetdisk.exe #表示杀死进程,/F强制杀死,/IM 指定杀死的进程名
start BaiduNetdisk.exe 

但计划任务不会调试导致笔者只能曲线救国,利用哪吒面板的远程运行命令功能来实现,把Server端添加到哪吒面板不再赘述。
哪吒面板-后台-任务-添加计划任务

计划时间自定,我是  3 */15 * * * *   (即每15min的第3s运行一次)
命令如下:
cd C:\Users\Administrator\Desktop\BaiduNetdisk && .\restart.bat
"C:\Users\Administrator\Desktop\BaiduNetdisk"请自行修改为百度网盘目录
特定服务器选择目标服务器即可。

文章作者: xieshang
版权声明: 本博客所有文章除特別声明外,均采用 CC BY-NC 4.0 许可协议。转载请注明来源 xieshang !
评论
  目录