Let's say you have trading partners who can only transfer files to you via SFTP. Incidentally, you also happen to have an account on Azure Blob Storage and you prefer to store those files there. You're probably thinking: How can I automatically transfer files from my SFTP server to Azure Blob Storage? That's easy if you're using JSCAPE MFT Server.
There are a couple of ways of doing this using JSCAPE MFT Server and I'm going to show you two of them. In the first method, which I'm going to demonstrate in this post, I'm going to assume you want all your SFTP file uploads from the trading partners in question to be transferred directly to the Azure Blob Storage folder upon upload.
Watch the video
Would you prefer to watch a video showing how to automatically transfer files from SFTP to Azure Blob via network storage? If so, you may play the video below. Otherwise, just skip it if you wish to continue reading.
What we'll need to set up on JSCAPE MFT Server to achieve that is a network storage object for that Azure Blob Storage folder and a virtual path that maps to that network storage. Frrom your trading partners' point of view, that virtual path will appear just like a regular folder when, in fact, it actually maps to a Azure Blob Storage folder.
Before we head out to our JSCAPE MFT Server manager, let me first show you what I have on Azure Blob Storage. So, I have an Azure blob named 'jcpv-test' and, inside it, a folder named 'folder1'. That's where I'm going to store all those SFTP file uploads.
Ok. Let's now head over to our JSCAPE MFT Server instance and login to the JSCAPE MFT Server manager. Notice that, in my Services module, I already have an SFTP service up and running. We need that service because that's what our trading partners will be using to upload files to us.
With our SFTP service ready, we now proceed to our Network Storage module. Click Add to add a new network storage object.
Next, select Microsoft Azure Blob Service and then click OK.
We now need to enter the parameters for this network storage object. Start by entering the name. This will be used to identify this network storage on this JSCAPE MFT Server instance. In my case, I'll just enter 'ns-azureblob'.
Next, enter your Azure storage account name as well as its corresponding access key.
You'll also need to enter the remote directory on your Azure Blob Storage. In our case, if you recall, we have a folder named 'folder1' inside the Azure Blob named 'jcpv-test'. So, we just enter 'jcpv-test/folder1'.
We can then click the Test Server button to test our connection. If there's a problem, you'll get a message box describing it. So, for example, I'm getting a message that says 'The account being accessed does not support HTTP'. That usually means, we need to configure this network storage object to use SSL/TLS.
To do that, just scroll back up and tick the Use SSL check box.
Let's click that Test Server button again. If all goes well, you should see a message saying the 'Network Storage test passed'.
And once you click the OK button in the parameters dialog, you'll be brought back to the main screen, where you should see your newly created Azure Blob network storage object.
Now that we have our network storage object ready, the next step is to map this network storage with a virtual path. We have two options here. We can map it to a user's virtual path or to a group's virtual path.
In most of our tutorials, we've been mapping network storage objects to a user's virtual path. This time let's map this network storage to a group's virtual path for a change. If you're not familiar with groups, I suggest you read this page in the online documentation.
Note: In a production environment, you will probably want to segregate files belonging to different user accounts. In that case, it might be more appropriate to map each network storage object to a specific user account instead of a group.
For this example, we have two user accounts, 'tp1' and 'tp2'. Once we have our group ready, we'll be assigning these user accounts to that group.
To create a group, just go to the Groups module and click the Add button.
Give the group a name, say for example, 'sftp to azure group'.
Next, specify a virtual path for this group. For example, '/sftptoazure'. So, whenever a member user account of this group logs in to our server, that user will find a virtual path named 'sftptoazure' under its root virtual path.
To map this virtual path to our Azure Blob network storage object, we simply tick the Network Storage option button and select the network storage object in question from the drop-down list.
Once you're done here, click OK.
You should then see your newly created group in the Groups module. For our last step, we just need to add our two users to this group. To do that, just click the Users button...
... and then select the users you wish to add. So, in our case, that would be tp1 and tp2. Click OK to proceed. Note that all members of this group will initially have equal permissions to the virtual path. You might want to apply some restrictions in a production environment. For example, you might want to limit user permissions to just uploads. For more information about virtual path permissions read this page in the online documentation.
We're now ready to try this out. Let's launch our file transfer client and connect to our SFTP service using login credentials of one of our trading partner user accounts. Let's just use tp1 for this example.
Once tp1 logs in, the folder named 'sftptoazure', which is the virtual path mapped to our Azure Blob network storage, should be visible right away from tp1's root path.
If we navigate into that virtual path, we should see exactly the same files we saw earlier in our Azure Blob storage folder.
And if we upload a file to that folder...
... and check inside the actual Azure Blob folder, we should see the newly uploaded file there.
That's it. Now you know how to configure JSCAPE MFT Server so it can automatically transfer files from SFTP to Azure Blob Storage.
For my second example, which I'm going to illustrate in a separate post, I'm going to assume what you actually want is to have your SFTP server store those files locally first and then forward those files to Azure Blob Storage at a later time. Stay tuned for that.
Try this yourself
Would you like to try this yourself? Download the FREE, fully-functional Starter Edition of JSCAPE MFT Server now.