Comments (5)
*/1 * * * * /home/m/bypy.py syncup > /home/bypylog
from bypy.
你好。
没玩过cron,不过从你的日志来看,删除了云端的文件然后就没有了。猜测:
- 误跑了bypy.py delete命令
- syncup 加了三个参数,并且最后的一个参数(deleteremotefile)不为零,并且要同步的远程目录比本地目录要多一些文件。
如果不是上述两个原因,你加上 -d -v 跑一下再贴个输出?
from bypy.
哈哈,搞定了 ,./bypy.py syncup 后面没有跟本地路径,所以导致cron执行的时候只是上传/root中的文件。
./bypy.py syuncup [localdir] 就行了。
还有请问一下syncup和upload的区别是保持本地和远程文件同步吗?本地目录和远程目录实时互相克隆?
from bypy.
cron中bypy.py必须要指定本地路径,与直接shell下不同,shell下不用指定目录,默认上传当前目录。
from bypy.
哦,默认用当前目录,cron跑的时候的当前目录应该设成了/root。
syncup和upload的区别是:
- syncup先汇总本地和远端口目录下的文件,比较后上传远程不存在的文件。upload则是一边遍历本地目录,一边上传,不管远端文件存在与否。
- syncup可以通过指明删除远端文件参数实现向上同步-操作完成后,远端目录变得和本地目录一致。而upload不能做删除。
- upload可以上传单个文件,syncup只能上传目录。
from bypy.
Related Issues (20)
- 不能通过授权 HOT 3
- 一直等待 HOT 8
- upload有错误,已登录 HOT 4
- upload开了会员,依然被限速 HOT 3
- You need to authorize this program before using any PCS functions. HOT 1
- 更新最新版本后,一直出现错误提示 HOT 1
- syncup失败 HOT 4
- syncup前后文件名和文件大小一致,但因md5校验码不同被判定为不同文件 HOT 1
- Questions about Copilot + Open Source Software Hierarchy
- 每次上传要报错一次,不知道有没有影响 HOT 3
- 一直授权不成功,http error, 贴出了bypy -dv info HOT 1
- Error accessing 'https://pcs.baidu.com/rest/2.0/pcs/file' HOT 3
- 授权不成功 HOT 1
- Trigger security policy 错误 HOT 1
- 无法获得授权 HOT 1
- 无法调用bypy info命令 HOT 11
- bypy info 绑定失败 HOT 1
- 执行两次一样的上传命令会导致文件被删除 HOT 3
- 放个收款码吧,用着都不好意思了哈哈😂
- 下载到服务器一直等待 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bypy.