Grounded in the Cloud
Showing results for 
Search instead for 
Did you mean: 

Migrating your files with the Windows CLI


Not all of us have had the pleasure of using HP Cloud Object Storage yet. Some customers may keep their data on other storage systems like Amazon S3, Dropbox, or even Microsoft Skydrive. This can present a problem when migrating over to HP Cloud Object Storage. After all, we have better things to do with our time than copy our files one by one from system to the system. To address this problem we've created a new Powershell cmdlet available within the Windows CLI that I’d like to share with you called Migrate-drive. This cmdlet specializes in moving data from S3 Buckets , Skydrive and Dropbox to a set of our Object Storage Containers. First off, let’s look at a full S3 conversion in action. Suppose that we had TLPRoot and TLPTest2 Buckets in S3 and the TLPTest2 Bucket contained MikeConfig.txt and NewHelp.text files.

Now let’s move these files over to HP Cloud Object Storage.



Your first argument is the Provider name. Valid entries are S3, Skydrive and Dropbox. The –ak stands for AccessKey and –sk stands for Secret Key. These parameters are only required if S3 is the Provider (more on this later). Now let’s check our results.



In the example above we’ve copied every S3 Bucket found for the supplied credentials into a set of corresponding Containers. After we issue the get-psdrive command you can see that a new set of Containers exist, one for each migrated Bucket. To mount just issue


Cd yourContainer:


You should also notice that any folder structures that you’ve created within S3 have been preserved during the copy operation. Now let’s introduce a bit more precision by moving only the Buckets that we’re interested in. In this case the TLPRoot bucket.



The –b argument takes a set of comma delimited bucket names (each in quotes) and copies only those specified over to Object Storage.


Finally let’s look at a few other providers that we can move data from. Here’s an example of moving our SkyDrive based data.



In this example you’ll notice that the only required parameter is the Provider name. The reason no credentials are required for non-S3 stores is because these operations rely on the fact that you’ve installed the Skydrive or Dropbox clients. These clients keep your local machine in sync with the store and we’re simply doing a complete recursive copy from your local machine, to HP Cloud Object Storage. One side effect of this approach is the need to place the folders found in a root container named after the Provider. You can see this by observing the SkyDrive Container present in the get-psdrive output above.


We hope this cmdlet simplifies migrating or backing up your files from other storage providers. If you have ideas or questions please feel free to send feedback to the Developer Experience team.  We look forward to hearing from you.

Senior Manager, Cloud Online Marketing
0 Kudos
About the Author


I manage the HPE Helion social media and website teams promoting the enterprise cloud solutions at HPE for hybrid, public, and private clouds. I was previously at Dell promoting their Cloud solutions and was the open source community manager for OpenStack and at Rackspace and Citrix Systems. While at Citrix Systems, I founded the Citrix Developer Network, developed global alliance and licensing programs, and even once added audio to the DOS ICA client with assembler. Follow me at @SpectorID

Jan 30-31, 2018
Expert Days - 2018
Visit this forum and get the schedules for online HPE Expert Days where you can talk to HPE product experts, R&D and support team members and get answ...
Read more
See posts for dates
HPE Webinars - 2018
Find out about this year's live broadcasts and on-demand webinars.
Read more
View all