Moving Large Amounts of Data from Local Disk (non-HDFS) to Amazon S3

Sharing is caring!

<div dir&equals;"ltr" style&equals;"text-align&colon; left&semi;">Fortunately&comma; We have several tools at our disposal to move data from local disks to Amazon S3<&sol;p>&NewLine;<div style&equals;"clear&colon; both&semi; text-align&colon; center&semi;"><a href&equals;"http&colon;&sol;&sol;www&period;thecloudxperts&period;co&period;uk&sol;wp-content&sol;uploads&sol;2017&sol;05&sol;amazon-s3&lowbar;preview&period;png" style&equals;"margin-left&colon; 1em&semi; margin-right&colon; 1em&semi;"><img border&equals;"0" data-original-height&equals;"420" data-original-width&equals;"960" height&equals;"140" src&equals;"http&colon;&sol;&sol;www&period;thecloudxperts&period;co&period;uk&sol;wp-content&sol;uploads&sol;2017&sol;05&sol;amazon-s3&lowbar;preview-300x131&period;png" width&equals;"320" &sol;><&sol;a><&sol;div>&NewLine;<p><b>1&period; Using the Jets3t Java Library<&sol;b><br &sol;>JetS3t is an open-source Java toolkit for developers to create powerful yet simple applications to interact with Amazon S3 or Amazon CloudFront&period; JetS3t provides low-level APIs but also comes with tools that let you work with Amazon S3&period;<&sol;p>&NewLine;<p>One of the tools provided in the JetS3t toolkit is an application called Synchronize&period; Synchronize is a command-line application for synchronizing directories on your computer with an Amazon S3 bucket&period; It is ideal for performing backups or synchronizing files between different computers&period;<br &sol;>One of the benefits of Synchronize is configuration flexibility&period; Synchronize can be configured to open as many upload threads as possible&period;<&sol;p>&NewLine;<p><b>To set up Synchronize<&sol;b><br &sol;>1&period; Download JetS3Tt from the following URL&colon; http&colon;&sol;&sol;jets3t&period;s3&period;amazonaws&period;com&sol;downloads&period;html&period;<br &sol;>2&period; Unzip jets3t&period;<br &sol;>3&period; Create a synchronize&period;properties file and add the following parameters&comma; replacing the values for accesskey and secretkey with your AWS access key identifiers&colon;<br &sol;>accesskey&equals;xxx<br &sol;>secretkey&equals;yyy<br &sol;>upload&period;transformed-files-batch-size&equals;100<br &sol;>httpclient&period;max-connections&equals;100<br &sol;>storage-service&period;admin-max-thread-count&equals;100<br &sol;>storage-service&period;max-thread-count&equals;10<br &sol;>threaded-service&period;max-thread-count&equals;15<br &sol;>4&period; Run Synchronize using the following command line example&colon;<br &sol;>bin&sol;synchronize&period;sh -k UP somes3bucket&sol;data &sol;data&sol; &&num;8211&semi;properties synchronize&period;properties<&sol;p>&NewLine;<p><b>2&period; GNU Parallel&nbsp&semi;<&sol;b><br &sol;>GNU parallel is a shell tool that lets you use one or more computers to execute jobs in parallel&period; GNU parallel runs jobs&comma; which can be a single command or a small script to run for each of the lines in the input&period; Using GNU parallel&comma; you can parallelize the process of uploading multiple files by opening multiple threads simultaneously&period; In general&comma; you should open as many parallel upload threads as possible to use most of the available bandwidth&period; The following is an example of how you can use GNU parallel&colon; 1&period; Create a list of files that you need to upload to Amazon S3 with their current full path 2&period; Run GNU parallel with any Amazon S3 upload&sol;download tool and with as many thread as possible using the following command line example&colon; ls &vert; parallel -j0 -N2 s3cmd put &lbrace;1&rcub; s3&colon;&sol;&sol;somes3bucket&sol;dir1&sol; The previous example copies the content of the current directly &lpar;ls&rpar; and runs GNU parallel with two parallel threads &lpar;-N2&rpar; to Amazon S3 by running the s3cmd command&period;<&sol;p>&NewLine;<p><b>3&period;&nbsp&semi;Direct-to-S3<&sol;b><br &sol;>Aspera Direct-to-S3 offers UDP-based file transfer protocol that would transfer large amount of data with fast speed directly to Amazon S3&period; If you have a large amount of data stored in your local data center and would like to move your data to Amazon S3 for later processing on AWS &lpar;Amazon EMR for example&rpar;&comma; Aspera Direct-To-S3 can help move your data to Amazon S3 faster compared to other protocols such as HTTP&comma; FTP&comma; SSH&comma; or any TCP-based protocol&period;&nbsp&semi;http&colon;&sol;&sol;cloud&period;asperasoft&period;com&sol;big-data-cloud&sol;&period;<&sol;p>&NewLine;<p><b>4&period;&nbsp&semi;Using AWS Import&sol;Export<&sol;b><br &sol;>AWS Import&sol;Export accelerates moving large amounts of data into and out of AWS using portable storage devices for transport&period;<br &sol;><b>To use AWS Import&sol;Export<&sol;b><br &sol;>1&period; Prepare a portable storage device from the list of supported devices&period; For more information&comma; see Selecting Your Storage Device&comma; http&colon;&sol;&sol;aws&period;amazon&period;com&sol;importexport&sol;&num;supported&lowbar;devices&period;<br &sol;>2&period; Submit a Create Job request to AWS that includes your Amazon S3 bucket&comma; Amazon Elastic Block Store &lpar;EBS&rpar;&comma; or Amazon Glacier region&comma; AWS access key ID&comma; and return shipping address&period; You will receive back a unique identifier for the job&comma; a digital signature for authenticating your device&comma; and an AWS address to which to ship your storage device&period;<br &sol;>3&period; Securely identify and authenticate your device&period; For Amazon S3&comma; place the signature file on the root directory of your device&period; For Amazon EBS or Amazon Glacier&comma; tape the signature barcode to the exterior of the device&period;<br &sol;>4&period; Ship your device along with its interface connectors&comma; and power supply to AWS&period;<&sol;div>&NewLine;

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.