Skip to content

IBM/cos-unarchive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Static Badge Static Badge PyPI - Version

IBM Cloud Object Storage - Unarchive

This is a Python script to restore archived object in Object Storage.

Note: Only objects with Storage Class ACCELERATED or GLACIER are considered.

Installing

Before running the script, you must install ibm-cos-sdk (IBM COS SDK for Python). You can install with:

pip install -r requirements.txt

Running

To run the script:

chmod +x unarchive.py
./unarchive.py --apikey APIKEY -b BUCKET --crn CRN -d DAYS

Usage

usage: unarchive.py [-h] --apikey APIKEY -b BUCKET [--prefix PREFIX] [--continue-after AFTER] --crn CRN [-r REGION] -d DAYS [-s SIZE] [-t THREADS] [-v]

A python script to restore archived object in Object Storage.

options:
  -h, --help                              show this help message and exit
  --apikey APIKEY                         Required) API Key string
  -b BUCKET, --bucket BUCKET              (Required) The name of the bucket
  --prefix PREFIX                         Limits the response to keys that begin with the specified prefix. Page number calculation uses a slower method.
  --resume                                Continue a restore after the last object in the log.
  --crn CRN                               (Required) COS service id (CRN)
  -r REGION, --region REGION              COS Region. Default region is eu-de
  --endpoint-type {private,public,direct} COS Endpoint Type. Default is public. It could be public, private or direct
  -d DAYS, --days DAYS                    (Required) Specified the lifetime of the temporarily restored object
  -s SIZE, --size SIZE                    Restricts the number of objects to retrieve. Default and maximum is 1000
  -t THREADS, --threads THREADS           Number of parallel threads. Must be less than SIZE. Default is 10
  -v, --verbose                           Enable verbose logs

About

This is a python script to restore archived objects from BIM Cloud Object Storage

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages