SoftLayer object storage provides a low cost storage solution that can be used for many applications. Unlike file and block storage, object storage manages data as objects, with each object including the data itself, some metadata, and a globally unique identifier. For more information about the right storage solution for your application, please read Which storage solution is best for your project?. The command line is a powerful and flexible method to access object storage. There are several tools that can be installed and used from a Linux terminal. A common package is python-swiftclient used with the latest version of Ubuntu (14.04) for this example. Steps may vary depending on your distribution.
|Advantages:||Large files (> 5 GB) are supported, File segmentation is supported.|
|Disadvantages:||No advanced features (encryption, compression, etc.), No graphical interface|
|Use Cases:||Access when no graphical interface is available, uploading and downloading large files|
Access by Command Line (Linux)
- Access the Object Storage Screen
- Click the View Credentials link (record your credentials).
- Access the server's command line.
- Install the python swift client (this command is for Ubuntu, your distribution's commands may vary):
apt-get install python-swiftclient
- Export the authentication credentials to simplify later steps:
(https://tor01.objectstorage.softlayer.net/auth/v1.0/ ) export ST_USER= (IBMOS278685-10:######) export ST_KEY= (#############)
- Upload any files or directories you wish to the container you created earlier:
swift upload StorageContainer testfile.txt
- Swift object storage has a 5 GB single file upload limit. If you have files larger than this, you can upload them in segments with the following command:
swift upload -s
swift upload -s 1073741824 StorageContainer largefile
Note: This command will break large files into 1 GB chunks.
- Downloading a file follows the same format
swift download StorageContainer testfile.txt