我用的是阿里云服务器,想要一个传送备份文件到oss的命令
回3楼shinenuaa的帖子
谢谢我试试看!
-------------------------
回3楼shinenuaa的帖子
我下载了python sdk,里面只有一个OSS_Python_API_20121010文件,没有osscmd,求教!
-------------------------
回7楼shinenuaa的帖子
已经学会了非常感谢,现在就是发现内部通讯网址不能用!!
-------------------------
回9楼shinenuaa的帖子
用的就是oss-internal.aliyuncs.com这个!!用外网的oss.aliyuncs.com可以,把host改成oss-internal.aliyuncs.com就出现:
oss/oss_util.py:9: DeprecationWarning: the md5 module is deprecated; use hashlib instead
import md5
Traceback (most recent call last):
File 'test.py', line 10, in
res = oss.get_service()
File '/home/www/oss/oss_api.py', line 234, in get_service
return self.list_all_my_buckets()
File '/home/www/oss/oss_api.py', line 246, in list_all_my_buckets
return self.http_request(method, bucket, object, headers, body, params)
File '/home/www/oss/oss_api.py', line 227, in http_request
conn.request(method, url, body, headers)
File '/usr/lib64/python2.6/httplib.py', line 914, in request
self._send_request(method, url, body, headers)
File '/usr/lib64/python2.6/httplib.py', line 951, in _send_request
self.endheaders()
File '/usr/lib64/python2.6/httplib.py', line 908, in endheaders
self._send_output()
File '/usr/lib64/python2.6/httplib.py', line 780, in _send_output
self.send(msg)
File '/usr/lib64/python2.6/httplib.py', line 739, in send
self.connect()
File '/usr/lib64/python2.6/httplib.py', line 720, in connect
self.timeout)
File '/usr/lib64/python2.6/socket.py', line 567, in create_connection
raise error, msg
socket.timeout: timed out
求解决!
-------------------------
回10楼wongfaye的帖子
好了,我知道原因了,客服说我所在的服务器没有oss,所以不能内网,让我退款买别的呢,真可笑,感觉这不是云主机,而是vps!
赞0
踩0