请选择 进入手机版 | 继续访问电脑版

一元网络论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 6633|回复: 2

两个onedriver网盘之间文件互转存,以备份数据,防止黑号

[复制链接]

121

主题

126

帖子

581

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
581
发表于 2021-1-17 15:29:17 | 显示全部楼层 |阅读模式

很久之前从别人的 edu 账号申请了 of­fice365 账户,理论上永久的。没想到是黑号,最近那个管理员被 ban 了,我们这些子账号不知道安不安全,有点慌。onedrive 里面还存了很多宝贵的文件!一个个下载回来得多麻烦!

正好从群友那搞到个相对安全的 of­fice365 账户(他自己弄的),就想着能不能直接从旧 onedrive 保存到这个新 onedrive。可是巨硬的盘并没有自动的方式可以在不同 OneDrive 之间迁移数据,也不支持分享然后保存的。Mi­crosoft Flow 也不支持 onedrive busi­ness 互转。

从网上搜了下,有三好使的办法:

  1. MultCloud (富婆可以建议一下下)

Mult­Cloud 是个在线服务,通过网页就能一键将各个网盘的数据互传,傻瓜操作。但这货免费版只有 50g 流量一个月,根本不够用,而且速度很慢。
这货有个优点,支持国内的百度云,rclone 却不支持。

  1. Air Explorer(不建议)

Air Ex­plorer 是个 win­dows/​mac 平台的软件,也能一键将各个网盘的数据互传。但它的速度取决于你家的网络,像几百 g 的东西得等多久,不现实!

  1. Rclone(推荐)

Rclone 是一款命令行小程序,支持市面上各种各样的网盘间进行同步、上传、下载数据。它优点是能挂在 VPS 上,24 小时同步备份。省时省电!

下面简单记一下本菜鸡用 Rclone 的备份过程:

Reclone安装

翻出来很久之前黑五买的小鸡 (装了 cen­tos7),输入官网的一键代码安装 Rclone,安装过程很快的说。

curl https://rclone.org/install.sh | sudo bash

获取onedrive授权码

从 https://rclone.org/downloads/ 下载 win­dows AMD64 - 64 Bit 平台的 Rclone
解压,然后 cmd 到那个文件夹,输入

rclone authorize "onedrive"

这时会弹出浏览器,登录你的 onedrive,显示这个即可完成授权

image
image

然后回来刚刚的 cmd,会看到 {} 里面一大段代码,这个就是授权码了

image
image

{"access_token":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","expiry":"2019-03-03T21:58:45.6416642+08:00"}

先放着窗口,等会要用到。

连接onedrive网盘

Ssh 连接小鸡,输入

rclone config
#~:rclone config
No remotes found - make a new one
n) New remote 连接新远程网盘
s) Set configuration password
q) Quit config
n/s/q> n
name> onedrive1 随便起个名字
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 / Alias for a existing remote
   \ "alias"
 2 / Amazon Drive
   \ "amazon cloud drive"
 3 / Amazon S3 Compliant Storage Providers (AWS, Ceph, Dreamhost, IBM COS, Minio)
   \ "s3"
 4 / Backblaze B2
   \ "b2"
 5 / Box
   \ "box"
 6 / Cache a remote
   \ "cache"
 7 / Dropbox
   \ "dropbox"
 8 / Encrypt/Decrypt a remote
   \ "crypt"
 9 / FTP Connection
   \ "ftp"
10 / Google Cloud Storage (this is not Google Drive)
   \ "google cloud storage"
11 / Google Drive
   \ "drive"
12 / Hubic
   \ "hubic"
13 / JottaCloud
   \ "jottacloud"
14 / Local Disk
   \ "local"
15 / Mega
   \ "mega"
16 / Microsoft Azure Blob Storage
   \ "azureblob"
17 / Microsoft OneDrive
   \ "onedrive"
18 / OpenDrive
   \ "opendrive"
19 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
   \ "swift"
20 / Pcloud
   \ "pcloud"
21 / QingCloud Object Storage
   \ "qingstor"
22 / SSH/SFTP Connection
   \ "sftp"
23 / Webdav
   \ "webdav"
24 / Yandex Disk
   \ "yandex"
25 / http Connection
   \ "http"
Storage> 18 这里连接的onedrive,所以选18
Microsoft App Client Id
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_id> 回车
Microsoft App Client Secret
Leave blank normally.
Enter a string value. Press Enter for the default ("").
client_secret> 回车
Edit advanced config? (y/n)
y) Yes
n) No
y/n> n 填n
Chunk size to upload files with - must be multiple of 320k.
Above this size files will be chunked - must be multiple of 320k. Note
that the chunks will be buffered into memory.
Enter a size with suffix k,M,G,T. Press Enter for the default ("10M").
chunk_size> 直接回车就好
The ID of the drive to use
Enter a string value. Press Enter for the default ("").
drive_id> 直接回车就好
The type of the drive ( personal | business | documentLibrary )
Enter a string value. Press Enter for the default ("").
drive_type> 直接回车就好
By default rclone will hide OneNote files in directory listings because
operations like "Open" and "Update" won't work on them.  But this
behaviour may also prevent you from deleting them.  If you want to
delete OneNote files or otherwise want them to show up in directory
listing, set this option.
Enter a boolean value (true or false). Press Enter for the default ("false").
expose_onenote_files> 直接回车就好
Remote config
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> n 这里选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 "onedrive"
Then paste the result below:
result> 这里填入刚刚电脑浏览器获取的OneDrive授权码。
Choose a number from below, or type in an existing value
 1 / OneDrive Personal or Business
   \ "onedrive"
 2 / Root Sharepoint site
   \ "sharepoint"
 3 / Type in driveID
   \ "driveid"
 4 / Type in SiteID
   \ "siteid"
 5 / Search a Sharepoint site
   \ "search"
Your choice> 选1
Found 1 drives, please select the one you want to use:
0: OneDrive (business) id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Chose drive to use:> 这里检测到你账户拥有的OneDrive,填0
Found drive 'root' of type 'business', URL: https://lookertbsteduau-my.share ... xxxxxxxxx/Documents
Is that okay?
y) Yes
n) No
y/n> 填y确认
[one]
type = onedrive
token = {"access_token":"xxxxxxxxxxx"}
drive_id = xxxxxxxxxxxx
drive_type = business

y) Yes this is OK
e) Edit this remote
d) Delete this remote
y/e/d> 再填y确认就完事了

然后我们再输入

rclone config

就能看到刚刚添加的网盘了。

image
image

因为我的小鸡是 OVZ,这商家不支持 FUSE 挂载,就不搞这个了(

然后重复上述步骤,再连接一个 onedrive。

两个网盘都添加完成后,就可以正式开始对拷了

退出 rclone,然后输入

screen rclone copy onedrive1: onedrive2:

就能断开 ssh 让它后台备份了。(会出现假死状态,其实是在运行的)

最后

rclone 这东西不怎么占 cpu 和内存,可以放心使用。而且对小鸡的空间不会有很大影响。再加上 VPS 本身拥有很强大的上传和下载能力,备份效果非常棒!很快就能完成!

但!
建议不要直接用 rclone copy onedrive1: onedrive2:! 我的 30g 小鸡不知道是不是遇到 bug,它直接把我空间吃满,小鸡直接炸掉只能重装了。。。

image
image

建议手动指定文件夹复制到文件夹rclone copy onedrive1:/galgame onedrive2:/galgame这样比较安全(确信

这东西还有个缺点,就是耗费的流量是双倍的,因为要用到上传和下载呢!但 vps 的流量这么多,每个月根本用不完,也不在乎这点流量了。还有不支持百度云。

回复

使用道具 举报

0

主题

8

帖子

30

积分

新手上路

Rank: 1

积分
30
发表于 2022-3-24 13:09:55 | 显示全部楼层
[color=rgba(0, 0, 0, 0.86)]很久之前从别人的 edu 账号申请了 of­fice365 账户,理论上永久的。没想到是黑号,最近那个管理员被 ban 了,我们这些子账号不知道安不安全,有点慌幸运飞艇走势图
[color=rgba(0, 0, 0, 0.86)]澳洲幸运20稳赚技巧 。onedrive 里面还存了很多宝贵的文件!一个个下载回来得多麻烦!


回复

使用道具 举报

0

主题

20

帖子

54

积分

注册会员

Rank: 2

积分
54
发表于 2023-1-19 01:05:40 | 显示全部楼层
SA娛樂城是亞洲實力非凡的百家樂系統商
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|一元网络论坛

GMT+8, 2024-3-28 20:26 , Processed in 0.116226 second(s), 19 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表