How To Schedule Automated File Uploads From Your Server To Google Storage
Demonstrates how to schedule an automated file upload from your server to Google Storage
We've already showed you how to configure JSCAPE MFT Server to monitor a directory for newly added files and then upload those files to either Amazon S3 or Azure Files. So today, as we show you how to upload files to Google Storage, let's do something different. Instead of waiting for newly added files, let's try uploading files on a pre-defined schedule.
What we want to do
Here's a diagram illustrating what we want to do.
Prerequisites from Google Cloud Storage
Before you start configuring anything on JSCAPE MFT Server, you need to have a Google Storage bucket ready first. You also need to create a Google Cloud Service Account and obtain that account's corresponding private key (a JSON file). We assume you can take care of those yourself.
Once you have that private key ready, you can then proceed to JSCAPE MFT Server and set up a trading partner for that Google Cloud Storage service account.
Creating a Google Cloud Storage Trading Partner
A trading partner is a JSCAPE MFT Server object that holds all the information you need to connect to a particular remote service. In our case, that service is on Google Cloud Storage. For more information about trading partners, watch this video:
To create a Google Storage trading partner, go to the Trading Partners module and click the Add button.
Select Google Cloud Storage from the drop-down list and click OK.
Once the Add 'Google Cloud Storage Trading Partner' dialog is displayed, enter a name for the trading partner. You may also enter other pieces of information like your partner's Company and its contact email address. After that, select 'Use private key credentials' and browse to the JSON file you obtained earlier from Google.
Click the Test Server button to check if you can make a connection. If the test succeeds, click OK and proceed to create the trigger that would upload your files to that trading partner.
Creating a time-based trigger for uploading files to that Google Storage trading partner
To create a time-based trigger for uploading files to that Google Storage trading partner on a pre-defined schedule, go to the Triggers module and click the Add button.
Select Current Time from the Event type drop-down list and click Next.
The next step would be to specify a schedule on which the upload should take place. You can use the Time Expression dialog box to generate the needed expression.
Click Next to proceed.
After that, select the Trading Partner Regex File Upload action from the drop-down list and then click OK.
In the succeeding dialog, do the following:
- Select the trading partner you created earlier from the Partner drop-down list;
- Specify the Local Directory from which files you want to upload are located;
- Select Wildcard from the Expression Type;
- Enter *.* in the Regular Expression box;
- In the Remote Directory field, specify the name of the Google Storage bucket (or a directory inside that bucket) where you want the files to be uploaded to.
- [Optional] Tick the Delete on Success checkbox to delete each file that's uploaded successfully.
Click OK when done.
That's it. Now you know how to set up a scheduled file upload to a Google Storage bucket or folder using JSCAPE MFT Server.
Would you like to try this out yourself?
Download the free, fully-functional Starter Edition of JSCAPE MFT Server now.
How To Leverage Cloud Storage Services When Dealing With High Volume File Transfers
Amazon S3 vs Local Storage - Where Should You Store Files Uploaded to Your File Transfer Server?
How To Use Amazon S3 As The File Storage System of Your MFT Server
How To Connect and Upload Files To an Amazon S3 Trading Partner