mehwww / oss-sync Goto Github PK
View Code? Open in Web Editor NEW阿里云OSS同步工具
阿里云OSS同步工具
I have 3GB image files. the image is not so large, but it's large amounts . when I run this program,it appears stdout maxBuffer exceeded.
child_process.js:958
throw errnoException(process._errno, 'spawn');
^
Error: spawn ENOMEM
at errnoException (child_process.js:1011:11)
at ChildProcess.spawn (child_process.js:958:11)
at exports.spawn (child_process.js:746:9)
at Object.exports.execFile (child_process.js:628:15)
at exports.exec (child_process.js:591:18)
at Git.exec (/usr/local/node/lib/node_modules/oss-sync/lib/git.js:18:3)
at Git.commit (/usr/local/node/lib/node_modules/oss-sync/lib/git.js:37:84)
at /usr/local/node/lib/node_modules/oss-sync/sync.js:92:12
at fn (/usr/local/node/lib/node_modules/oss-sync/node_modules/async/lib/async.js:641:34)
at Object._onImmediate (/usr/local/node/lib/node_modules/oss-sync/node_modules/async/lib/async.js:557:34)
Attempting to sync with a directory containing path names with UTF16 encoded Chineses text causes the process to hang and unable to quit, forcing a reboot.
hi,运行的时候路径中包含中文字符的时候会报错。
也就是说只能上传,我到其他设备上能下载下来吗?想用来同步笔记
Error: EMFILE: too many open files
https://stackoverflow.com/questions/8965606/node-and-error-emfile-too-many-open-files
I use ubuntu 14.04 and nodejs v5.6.x.
/usr/lib/node_modules/oss-sync/lib/sync.js:3
const fs = require('fs')
^^^^^
SyntaxError: Use of const in strict mode.
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/usr/lib/node_modules/oss-sync/bin/osync.js:7:12)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
当我注释掉 'use strict' 后又有其他语法错误。我对nodejs 不是很熟悉。是不是我nodejs的环境问题?我的node版本为 v0.10.36
I prepared a json file .oss-sync.json
:
{
"endpoint":"...",
"accessKeyId":"...",
"secretAccessKey":"...",
"bucket":"sda1",
"source":"/Users/Administrator/Buckets/sda1/images",
"dest":"images"
}
Then when those done
cd /Users/Administrator/Buckets/sda1
mv camomile-960x600.jpg images/camomile-960x600.jpg
osync
One file was uploaded and I got images\camomile-960x600.jpg
through Aliyun OSS web console, which is not the one what I expected, since I use Windows OS and the web console doesn't recognize key images\camomile-960x600.jpg
as a directory and a file.
So my proposal is to add an option support in oss-sync json config file in order to normalize path, as but not limited to
{
...
"normalizePath":true
}
Thus path will be normalized as option normalizePath
is set to true, and I may get a directory "images", and a file "camomile-960x600.jpg" under the directory, through the web console.
My .oss-sync.json is as follows:
{
"source":"/home/fzx/work/dbbackup",
"dest":"mysql",
"accessKeyId":"",
"secretAccessKey":"",
"endpoint":"http://oss-cn-hangzhou.aliyuncs.com",
"bucket":"ahxtest",
"incrementalMode":false
}
New files are uploaded ok, but when i remove some files, and run osync, the file not deleted in OSS.
I use node.js v5.6.x.
是否没有删除功能?
我的node版本 win10 5.8 , ubuntu 14.04 5.9
之前版本一切都很OK,但是这次更新之后出现的问题。
win10下
Error: ENOENT: no such file or directory, stat 'D:\workspace{my path}(use "git reset HEAD ..." to unstage)
尝试几次之后
出现
Build: ✔
Upload: [] 0 B / 0 B ✔
Delete:
ubuntu 14.04 表现为
Error occurred:
SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided. Check your key and signing method.
I think it's time to add some new options for various situation. As far as now i have these two option in mind:
forceUpload
/-f
: Force upload every file without considering the git statusincrementalMode
/-i
: Only upload new file and wont detect deleted files, this will reduce time for building trashAppreciate for further suggestion.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.