Updated – 28/11/2021 – Azure now offers a fully-managed SFTP service built on top of Blob Storage that may be more suitable for your use case; look at the step-by-step guide to see if it meets your requirements.
In this article, we will show you how to deploy an SFTP service on Files.com and integrate it with Microsoft Azure Storage.
Table of Contents
SSH File Transfer Protocol (SFTP) is a network protocol used for secure file transfer over a secure shell. FTP/SFTP is still a common protocol used by many customers in several industries. Microsoft does not have a fully managed SFTP service in Azure yet, and if you are purely an Azure customer, then this is obviously a less desirable solution.
A while ago, we wrote a blog post on how to deploy a Secure FTP (SFTP) service on Microsoft Azure by leveraging the Azure Container Instance (ACI) powered by Azure File Shares. You can read more about this solution here.
If you still want to deploy a secure FTP with Azure blob storage without using containers and have a redundant copy for disaster recovery, then you want to look at a very interesting deployment solution from Files.com where you can deploy a secure FTP and then integrate it with Microsoft Azure where you can mount an existing container or sync your files to/from Azure storage.
If this is the first time you came across Files.com, then I will give you a quick overview of their effective file-sharing solution.
You can mount or sync with any cloud provider of your choice including Google, Amazon S3, Microsoft Azure, Box, Dropbox, Wasabi, Backblaze B2, Rackspace, and any on-premises or 3rd party.
Files.com supports two types of remote storage integrations as follows:
1) Remote Server Mount: This allows you to work with data stored with the remote storage (e.g. Azure blob) service right from your Files.com site. This is accomplished by mounting a remote server or storage container into a folder in Files.com. The files remain on the remote server. This is great for when you want to work with your remote files as if they’re stored locally without actually having to copy all the files over and pay for storing them in two places.
2) Remote Server Sync: This allows you to sync to any cloud provider in three different sync modes:
- Push files from Files.com to a remote server (e.g. Azure storage blob).
- Pull files from a remote server (e.g. Azure storage blob) to Files.com.
- Two-way sync where changes on either location are pushed and pulled to maintain a synchronized state between Files.com and the remote server. In this case, the remote server is Azure blob storage.
But unlike the remote server mount type, remote server sync is not real-time. This means that the sync happens at a polling interval of every hour, 15 minutes, or 5 minutes depending on your plan.
When to use mount vs sync
Remote Server Mount is generally recommended in most cases since it has the benefit of being more real-time and you avoid paying more to have your files stored in two places. But there are some scenarios when a Remote Server Sync is a better approach.
If you want to do a one-way push => to any cloud provider (e.g. Microsoft Azure storage) where you don’t need to have your files on the remote site exposed in Files.com, or if you want to store redundant copies of remote files in Files.com as a backup and in Microsoft Azure storage, then you would use remote server sync. There may be some other scenarios where sync will be a better fit for your business if you trust or work with a certain cloud provider for example. But again, in general, Remote Server Mount is what Files.com typically recommends.
In this article, I will show you both deployment options and then show you how to set up an integration between Files.com and Microsoft Azure storage.
To follow this article, you need to have the following:
1) Azure subscription – If you don’t have an Azure subscription, you can create a free one here.
2) Azure storage account – To create a general-purpose storage account, you can follow the instructions described here.
- You need one or more containers – You can follow the instructions here to create a container.
3) Files.com account – If you don’t have one, you can sign up for your free trial here.
Once you have all the prerequisites in place, take now the following steps:
Deploy Remote Server Mount
In this example, I have uploaded a couple of files to my Azure container as shown in the figure below.
Next, you need to log in to Files.com (e.g. account-name.files.com) site and under the Integrations section, click the Sync/Mount tab to see all of the services that are currently supported for mounting. As I mentioned previously, I will use the Microsoft Azure storage service to demonstrate this feature.
Type Azure in the search integration bar. Then select Microsoft Azure, and the first step is to ‘add Microsoft Azure as a remote server‘ to your site.
Next, you need to provide a name that you can choose anything for your own reference, then you need the Azure Storage account name, the container name, and the storage account access key. Once you enter all the details, click Save.
Now that you’ve added Azure as a remote server, you can proceed to set up the mount. But before doing that, you should create a folder for the mount in Files.com.
You need to go to the Files section and create a new folder. In this example, I will name it ‘Az Mount Container in Files.com‘.
Next, click on the newly created folder and then go to Folder settings. Select the Remote server mount from the drop-down menu list.
Next, click Add new remote server mount, select the Remote server and choose the Azure Blob Storage that you added in the previous step. Now, if you have a subfolder under the storage container in Azure blob that you want to mount, you could add it under the Remote path. In this example, I will mount the root of that storage container so I will leave the Remote path blank.
Click Save and then you should immediately see your files from the Azure storage container mounted in the Files.com folder as shown in the figure below.
What you could do next is, start operating on these files just like any other files in Files.com, you can preview them, download them, or you could also upload new files into this folder, you can upload directly via the browser with drag and drop.
You can also operate on this folder using any of the supported protocols, including FTP and SFTP to share those files across your organization.
The great thing about the mount scenario is, that once you connect and upload files into the folder in Files.com, they will show immediately in the Azure container. And if you deleted a file from the folder, it will also be reflected in the container. In the short clip video below, I used the SFTP client from FileZilla to demonstrate the remote server mount feature.
Deploy Remote Server Sync
Now that we’ve seen a remote server mount deployment, let me show you how to set up a Remote Server Sync with Azure.
As I mentioned previously, the remote server sync option is not real-time. This means that the sync happens at a polling interval of every hour, 15 minutes, or 5 minutes depending on your plan.
In this example, I will use a different container in my Azure storage account, so I have created a new container in Azure called ‘sync-sftp-filescom-to-azure‘.
Next, you want to add a new remote server definition for your sync. So switch back to Files.com under the Settings section, go to Integrations, then navigate to Remote servers and click Add new remote server.
Again choose Microsoft Azure and provide a name that you can choose anything for your own reference, then you need to provide the storage account name, the new container name, and the storage account access key. Once you enter all the details, click Save.
Next, I will create a new folder in Files.com. In this example, I will name it ‘Sync Files.com to Az Container‘. Click on the newly created folder and then go to Folder settings. And this time select Sync to/from remote server from the drop-down menu list, then click Add new remote server sync as shown in the figure below.
Next, select the sync target remote server which is the new Azure storage container. Then, select the sync direction. In this example, I will push items that are uploaded to this folder to the storage container in Azure, and I will delete the source file from this Files.com after the files are synced to Azure. Again if you have a specific subfolder under the Azure storage container that you want to sync, you could add it under the Remote path. In this example, I will sync to the root container. Click Save.
And now my sync is set up to Azure as you can see in the figure below, even though I have files in my Azure container.
They are not showing up in Files.com because this is synced in one direction and it’s only pushing files to my Azure container.
In the short clip video below (fast forward), I will upload some files into the folder (via FTP/SFTP), and you will see the files are synced to the Azure container (after 5 minutes) and deleted from the Files.com folder. This is the minimum sync time you can have depending on your plan with Files.com.
As you can see, the file is no longer available on the source (Files.com), so this sync will now push files from the folder to the remote server and remove them after they are transferred.
That’s it there you have it!
In this article, I showed you how to leverage the Files.com solution to deploy a remote server mount and remote server sync, so you can deploy a secure FTP service and then integrate with Microsoft Azure storage where you can mount an existing container or sync your files to/from Azure storage. Remote Server Mount is a great deployment option since it has the benefit of being real-time (by mounting the Azure blob storage) and then you avoid paying more to have your files stored in two places.
You can create an SFTP service based on Files.com today, and then sync your data to Microsoft Azure blob storage. This is a great solution because your data can be mounted directly or synced to/from Microsoft Azure, thus reducing additional storage costs on Files.com.
Thank you for reading my blog.
If you have any questions or feedback, please leave a comment.