Azure to Linux file transfer

Niren Adhikary 96 Reputation points
2023-07-06T18:09:08.3233333+00:00

We want to transfer the files from Azure to Linux on- prem? How should we do it? There may be multiple ways but I am thinking we need to setup below 1.Express route connection - what ports or configuration needed from azure and Linux on-Prem vm to setup the connectivity ? 2. AZcopy on the destination Linux vm. I assume we need write a script and schedule it on Linux vm and install the a copy tool on Linux. If the above approach is correct can I have more detail steps to implement this? Is there a better way to send the files from azure to Linux considering secure transfer.

Azure Data Lake Storage
Azure Data Lake Storage
An Azure service that provides an enterprise-wide hyper-scale repository for big data analytic workloads and is integrated with Azure Blob Storage.
Azure Storage
Azure Storage
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
{count} votes

1 answer

Sort by: Most helpful
  1. PRADEEPCHEEKATLA 91,656 Reputation points Moderator
    2023-07-07T04:27:06.8133333+00:00

    @Niren Adhikary - Thanks for the question and using MS Q&A paltform.

    To transfer files from Azure to a Linux on-premises server, you have a few options. One common approach is to use Azure ExpressRoute to establish a private network connection between Azure and your on-premises environment. Here's a step-by-step guide on how to set up the connectivity and transfer files securely:

    Set up ExpressRoute:

    • Determine your bandwidth requirements and select an ExpressRoute connectivity provider.
    • Configure ExpressRoute circuit with the provider, following their specific instructions.
    • Ensure that you have the necessary hardware, such as a router or a network appliance, to connect your on-premises network to the ExpressRoute circuit.
    • Establish the ExpressRoute circuit by configuring the necessary settings, including the connection type, bandwidth, and routing.

    Configure connectivity between Azure and Linux on-premises VM:

    • Set up a virtual network (VNet) in Azure if you haven't already done so. Ensure that the VNet has a virtual network gateway configured.
    • Configure a site-to-site VPN connection between the Azure VNet and your on-premises network using the ExpressRoute circuit.
    • Configure the necessary network settings on your Linux on-premises VM, including IP addressing and routing, to establish connectivity with the Azure VNet.

    Install and configure AZCopy on the Linux VM:

    • SSH into your Linux on-premises VM and ensure that it has internet connectivity.
    • Download the AZCopy binary for Linux from the official Microsoft download page.
    • Extract the AZCopy binary and move it to a directory accessible from the command line.
    • Set up the required access credentials, such as storage account name and account key or SAS token, for the Azure storage account that contains the files you want to transfer.
    • Write a script using AZCopy to specify the source and destination locations, and any additional options such as recursive copying or preserving file attributes.
    • Test the script to ensure it transfers files as expected.

    Schedule the file transfer:

    • Use the cron utility on Linux to schedule the execution of your AZCopy script at specific intervals.
    • Set the appropriate frequency for the transfer, such as hourly, daily, or weekly, depending on your requirements.

    By following the above steps, you can establish a secure file transfer mechanism between Azure and your Linux on-premises VM. ExpressRoute ensures a private and dedicated connection, and AZCopy enables efficient and reliable file transfers.

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.