用于ibm cloud对象存储上传的backwork插件。

backwork-upload-cos的Python项目详细描述


后台上传cosBuild StatusPyPI version

添加对ibm云对象存储上传的支持到^{}

安装

您可以使用pip安装此插件:

$ pip install backwork-upload-cos

使用

安装插件后,您将能够使用upload cosshow cosdownload cos。 关于backwork的命令。

backwork upload cos

$ backwork upload cos --help
usage: backwork upload cos [-h][-e ENDPOINT_URL][-s INSTANCE_ID][-u ACCESS_KEY][-p SECRET_KEY][local_path] bucket remote_path

Upload a file to Cloud Object Storage.

positional arguments:
  local_path            path in the local file system of the file to be
                        uploaded
  bucket                target s3 bucket
  remote_path           path on Cloud Object Storage where the file will be
                        stored

optional arguments:
  -h, --help            show this help message and exit
  -e ENDPOINT_URL, --endpoint-url ENDPOINT_URL
                        endpoint URL of the S3 storage
  -s INSTANCE_ID, --instance-id INSTANCE_ID
                        service instance id
  -u ACCESS_KEY, --access-key ACCESS_KEY
                        acccess key id of HMAC credentials
  -p SECRET_KEY, --secret-key SECRET_KEY
                        secret access key of HMAC credentials

backwork show cos

列出备份

usage: backwork show cos [-h][-e ENDPOINT_URL][-s INSTANCE_ID][-u ACCESS_KEY][-p SECRET_KEY][-l LIMIT][--sort-last-modified]
                         bucket path

List available backups in Cloud Object Storage.

positional arguments:
  bucket                target s3 bucket
  path                  Path/prefix to the look for backups in

optional arguments:
  -h, --help            show this help message and exit
  -e ENDPOINT_URL, --endpoint-url ENDPOINT_URL
                        endpoint URL of the S3 storage
  -s INSTANCE_ID, --instance-id INSTANCE_ID
                        service instance id
  -u ACCESS_KEY, --access-key ACCESS_KEY
                        acccess key id of HMAC credentials
  -p SECRET_KEY, --secret-key SECRET_KEY
                        secret access key of HMAC credentials
  -l LIMIT, --limit LIMIT
                        max number of results to return
  --sort-last-modified  if passed, sorts results from most to least recent

一个常见的用例是获取最新备份的名称:

backwork show cos \
  --endpoint-url "${IBM_COS_ENDPOINT_URL}"\
  --instance-id "${IBM_COS_INSTANCE_ID}"\
  --access-key "${IBM_COS_ACCESS_KEY}"\
  --secret-key "${IBM_COS_SECRET_KEY}"\"my-bucket"\"my-path"\
  --limit 1\
  --sort-last-modified \| jq .backups[0]

backwork download cos

$ backwork download cos --help
usage: backwork download cos [-h][-e ENDPOINT_URL][-s INSTANCE_ID][-u ACCESS_KEY][-p SECRET_KEY]
                             remote_path bucket [local_path]

Download a file from Cloud Object Storage.

positional arguments:
  remote_path           Cloud object storage path/prefix to the object being
                        downloaded
  bucket                target s3 bucket
  local_path            path to save the file to on the local filesystem

optional arguments:
  -h, --help            show this help message and exit
  -e ENDPOINT_URL, --endpoint-url ENDPOINT_URL
                        endpoint URL of the S3 storage
  -s INSTANCE_ID, --instance-id INSTANCE_ID
                        service instance id
  -u ACCESS_KEY, --access-key ACCESS_KEY
                        acccess key id of HMAC credentials
  -p SECRET_KEY, --secret-key SECRET_KEY
                        secret access key of HMAC credentials

作者

  • Michael Lin <michael.lin1@ibm.com>

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java SimpleCursorAdapter删除值   java结束while循环条件   java检查设备是否连接到特定网络   java组织。冬眠MappingException找不到逻辑名称为annotation getter的列   为什么java邮件中会抛出此异常?   加载SDK时发生java Eclipse错误   返回奇怪输出的Java数组   JavaXStream和对象类序列化   将枚举列表传递给namedQuery后出现java非法转换异常。Hibernate中的setParameter()   java Android studio不允许我在字符串上使用开关?   有没有办法从Java程序访问存储在Chrome中的cookie   java在枚举中构造实例而不修改枚举类   java Blackberry JDE FieldChangeListener   java修复错误:未报告的异常InterruptedException   java Spring数据JPA:findAll(具有规范和可分页)在计数查询中失败