admin

Linux下利用百度网盘备份上传数据文件
项目:https://github.com/oott123/bpcs_uploader 一键: yum -y in...
扫描右侧二维码阅读全文
24
2017/12

Linux下利用百度网盘备份上传数据文件

项目:https://github.com/oott123/bpcs_uploader
一键:

yum -y install unzip
wget https://github.com/oott123/bpcs_uploader/archive/master.zip -O bpcs_uploader.zip
unzip bpcs_uploader.zip
mv bpcs_uploader-master /home
cd /home
cd bpcs_uploader-master
chmod +x bpcs_uploader.php
./bpcs_uploader.php quickinit

按下y回车,然后提示Input o2WxT7iX as the user code if asked.并且打开https://openapi.baidu.com/device,登陆百度账号,把o2WxT7iX这个数值填进去,回到服务器上回车。

https://att.itzmx.com/data/attachment/forum/201702/09/232037ftdxdduoxbkobit3.jpg 提示如下代表已经成功绑定初始化
Access Granted. Your Storage Status: 2580.11G/3253.22G (79.31%)
Enjoy!

打开后可以看到多了个bpcs_uploader文件夹,Linux上操作上传下载的文件都在这里。
https://pan.baidu.com/disk/home#list/vmode=list&path=%2Fapps
默认2G限制,大于2G请将bpcs_uploader.php upload改为bpcs_uploader.php uploadbig
自动备份 以kangle的EP为例:

yum -y install p7zip
7za a /home/bpcsbackup/`date "+%Y-%m-%d~%H-%M-%S".7z` /backup/`date "+%Y%m%df"` -mx=0 -p123456
cd /home/bpcs_uploader-master
rm -rf /tmp/bpcs_to_upload_*
./bpcs_uploader.php upload /home/bpcsbackup/`date "+%Y-%m-%d*".7z` backup/`date "+%Y-%m-%d~%H-%M-%S".7z`
rm -rf /home/bpcsbackup/`date "+%Y-%m-%d*".7z`

压缩当天backup的备份到/home/bpcsbackup,然后上传到百度云/我的应用/bpcs_uploader/backup目录下将以上命令添加到crontab 或者添加sh然后添加到crontab

Last modification:May 6th, 2019 at 07:07 pm
如果觉得我的文章对你有用,请随意赞赏

Leave a Comment