关于数据库备份上传七牛云
来源:9-6 上传数据库备份到七牛私有云
kingdee88
2017-05-08
upload.js 里面的 require('qiniu') 应该写成相对绝对路径, 不这样写,试了几遍,都没触发node上传任务
4回答
-
Scott
2017-05-08
好吧,那如果先初始化 package.json 呢,是不是就可以了
00 -
James_dai
2017-09-03
我这边也遇到了问题,
我的文件名叫task
upload.js中:
1、在movie.backup.sh 文件中:
NODE_ENV=$backUpFolder@$backFileName node /home/leek_manager/task/upload.js
2、执行:sh movie.backup.sh
3、tar包文件已经生成:movie_2017_09_03_1654.tar.gz
4、但是后面执行报错如下:
/home/leek_manager/task/node_modules/qiniu/qiniu/storage/rs.js:659
throw new Error('invalid putpolicy options');
^
Error: invalid putpolicy options
at new PutPolicy (/home/leek_manager/task/node_modules/qiniu/qiniu/storage/rs.js:659:11)
at uptoken (/home/leek_manager/task/upload.js:15:19)
at Object.<anonymous> (/home/leek_manager/task/upload.js:19:9)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:394:7)
012017-09-03 -
Scott
2017-05-17
试试这个办法;http://coding.imooc.com/learn/questiondetail/11308.html
00 -
前端初哥
2017-05-17
node: not found 好像不能调用啊
00
相似问题