Before you install and use Windows Azure ImportExportSample Sample you must:

  1. Review the Windows Azure ImportExportBlob Sample license terms by clicking the Custom link above.
  2. Print and retain a copy of the license terms for your records.

By downloading and using the Windows Azure ImportExportBlob Sample, you agree to such license terms.  If you do not accept them, do not use the software.

Introduction

The Windows Azure ImportExportBlob Sample is a command-line tool that exports the contents of a directory to blobs within a container in a storage account, and imports a container of blobs from the storage account to a directory. The storage account used is configurable with the application configuration file.

Prerequisites

Building and Running the Sample

To run the sample from Visual Studio 2010

  1. Open Visual Studio 2010 as an administrator.
  2. Browse to the folder where you extracted the sample and open ImportExportBlobConsole.sln.
  3. Press F6 to build the solution.
  4. Open a Command Prompt windowand then enter the ImportExportBlob command with the needed options. For more information about the available options, see ImportExportBlob Options.

ImportExportBlob options

Syntax

ImportExportBlob [-o command -d local-directory-path [-c container-name]] | [-h]

Options

-h

Display help information for the ImportExportBlob application.

-o export –d local-directory-path

Export the contents of a directory to a blob container in the storage account.

-o import -d local-directory-path -c container-name

Import the contents of a blob container in the storage account to a directory.

Configuring the storage connection string

By default, the Windows Azure ImportExportBlob Sample is configured to use development storage to store and retrieve the blobs that contain the contents of the directory. If you choose to deploy the ImportExportBlob application to Windows Azure, you must change the configuration string in the service model to specify a storage account in Windows Azure.

To change the connection string in Visual Studio

  1. In Solution Explorer, expand ImportExportBlobConsole, and then double click App.Config to edit the file.
  2. In the appSettings section within the configuration section, locate the following setting for the storage account connection string: <add key="StorageAccountConnectionString" value="useDevelopmentStorage=true" />.
  3. Change the value to use a connection string for Windows Azure storage. The connection
    string must be in the following format: DefaultEndpointsProtocol=[http|https];AccountName=<account-name>;AccountKey=<account-key>