Now that we have configured OpenStack Object Storage, we can also retrieve the stored objects using our swift client.
Log in to a computer or server has the Swift Client Package Installed.
We will download objects from our OpenStack Object Storage environment using the different swift client options:
To download the object tmp/test/test1, we issue the following command:
This downloads the object to our filesystem. As we downloaded a file with the full path, this directory structure is preserved, so we end up with a new directory structure of tmp/test with a file in it called test1.
To download the file without preserving the file structure, or to simply rename it to something else, we specify the -o parameter, as follows:
Downloading all objects from a container
We are also able to download complete containers to our local file system. To do this, we simply specify the container we want to download, as follows:
InterviewQuestions: Openstack Interview Questions
We can download all objects that reside under our OpenStack Object Storage account. If we have multiple containers, all objects from all containers will be downloaded. We do this with the parameter, as follows:
The swift client is a basic but versatile tool that allows us to do many of the things we want to do with files. Downloading objects and containers is achieved using the following syntax:
To download all objects from our account (for example, from all containers), we specify the following syntax:
Stay updated with our newsletter, packed with Tutorials, Interview Questions, How-to's, Tips & Tricks, Latest Trends & Updates, and more ➤ Straight to your inbox!
|OpenStack Training||Sep 26 to Oct 11||View Details|
|OpenStack Training||Sep 30 to Oct 15||View Details|
|OpenStack Training||Oct 03 to Oct 18||View Details|
|OpenStack Training||Oct 07 to Oct 22||View Details|
Ravindra Savaram is a Content Lead at Mindmajix.com. His passion lies in writing articles on the most popular IT platforms including Machine learning, DevOps, Data Science, Artificial Intelligence, RPA, Deep Learning, and so on. You can stay up to date on all these technologies by following him on LinkedIn and Twitter.
Copyright © 2013 - 2023 MindMajix Technologies