You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 2
Next »
In this tutorial we would be learning the movement of file, files and directory within Amazon S3 to designated file system and vice-versa.
Amazon S3 To Local File System
- Login to DBSync with valid credentials
- Create a project with name of your choice.
- Create connectors preferably of type Java and DB.
- The Java connector should have valid class name, user name and password , notably the class name is "awsS3Adapter" and the username and password are of Amazon S3 Storage
- Configure the DB Connector with any DB which is supported by DBSync, please refer to DBSync DB connector documentation for more information.
- Create a process with meaningful name like S3ToLocal which will be easy for other users to understand .
- Create a workflow with valid name , Trigger and rules as explained in latter sections
Trigger Setup
- Select the data-source as DB
- Choose the object corresponding to the Data-source
Rules Setup
- Add a rule with name of user choice, select the java connector and operation as insert.
- Set the target Object to upload directory which will write the total chosen directory with its files from designated file system to Amazon file system.
- Now user has to do the mapping as per his choice, the below are the sample which will help him understand how this need be done .
Mappings
Target Field |
Description |
Validate Row |
Has to be true |
Bucket |
|
Amazon Bucket to which it has to be written |
|
File pattern |
The name of the directory |
File Reference |
The source path from where the directory should be read.
For Eg: "C:/Users/Avankia111/Downloads/TestDirectory" in case of local machine this is the format. |
Region |
The Region where Amazon of the user is hosted |
As its that now the Connectors, Trigger and Rules have been set appropriately, it's time to Run sync and check whether all the files from the designated directory have copied to the destination i.e. Amazon s3 or not. |
Hit the Run Now button located at the top right corner of the page as shown in the above screen. If sync is successful executed it shows up in the console , in case of errors also same will be displayed in the console.
After the successful completion of sync, go to the Amazon S3 storage to the given file path to check files are copied along with correct directory name, file names and data in the files .