Backwork plug-in for IBM Cloud Object Storage uploads.
Project description
backwork-upload-cos
Add support for IBM Cloud Object Storage uploads to backwork
.
Installing
You can use pip
to install this plug-in:
$ pip install backwork-upload-cos
Using
After installing the plug-in you will be able to use the upload cos
, show cos
, and download cos
commands on 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
list backups
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
A common use case would be to get the name of the most recent backup:
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
Author
Michael Lin <michael.lin1@ibm.com>
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for backwork-upload-cos-0.3.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba2ce3d05106f66651f2c10026b53b5960d59cc4ae9340036a0d4f78b28ccb1b |
|
MD5 | dac48b031a30debeaed84fd3a86de64b |
|
BLAKE2b-256 | d0ecb8bce71a438e43e0010508234c73ff9ed10a2e6f8204b7e5d722b8df1b31 |
Close
Hashes for backwork_upload_cos-0.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a13414013410a072a9c03ad48d481d31e7f9aff7db4d99718b7f0bc20f8d89e |
|
MD5 | a1ba263c133d093e4c342b28c4fba8ae |
|
BLAKE2b-256 | d5ef11d6d4efcbeb9e9049e228416eaeeb196981ba29b68fb43ff84c089feea8 |