<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>UNIXy &#187; File size limitation</title>
	<atom:link href="http://blog.unixy.net/tag/file-size-limitation/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.unixy.net</link>
	<description>Fully Managed Dedicated Servers</description>
	<lastBuildDate>Thu, 09 Sep 2010 07:08:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Amazon S3 File Size Limitation &#8211; Solved</title>
		<link>http://blog.unixy.net/2009/04/amazons-s3-file-size-limitation-solved/</link>
		<comments>http://blog.unixy.net/2009/04/amazons-s3-file-size-limitation-solved/#comments</comments>
		<pubDate>Sun, 12 Apr 2009 09:38:25 +0000</pubDate>
		<dc:creator>UNIXy</dc:creator>
				<category><![CDATA[Break-Fix]]></category>
		<category><![CDATA[5368709120]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[File size limitation]]></category>
		<category><![CDATA[Limitation]]></category>
		<category><![CDATA[S3]]></category>

		<guid isPermaLink="false">http://blog.unixy.net/?p=8</guid>
		<description><![CDATA[If you attempt to store a file larger than roughly 5GB, the Amazon service will generate the following error and fail to store the file: &#60;Error&#62;&#60;Code&#62;EntityTooLarge&#60;/Code&#62;&#60;Message&#62;Your proposed upload exceeds the maximum allowed object size&#60;/Message&#62;&#60;ProposedSize&#62;6091682399&#60;/ProposedSize&#62;&#60;MaxSizeAllowed&#62;5368709120&#60;/MaxSizeAllowed&#62;&#60;/Error&#62; One way around this limitation is use the GNU/Linux command split to divide the file into several smaller chunks, which are [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.unixy.net%2F2009%2F04%2Famazons-s3-file-size-limitation-solved%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.unixy.net%2F2009%2F04%2Famazons-s3-file-size-limitation-solved%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>If you attempt to store a file larger than roughly 5GB, the Amazon service will generate the following error and fail to store the file:</p>
<blockquote><p>&lt;Error&gt;&lt;Code&gt;EntityTooLarge&lt;/Code&gt;&lt;Message&gt;<strong>Your proposed upload exceeds the maximum allowed object size</strong>&lt;/Message&gt;&lt;ProposedSize&gt;6091682399&lt;/ProposedSize&gt;<strong>&lt;MaxSizeAllowed&gt;5368709120&lt;/MaxSizeAllowed&gt;</strong>&lt;/Error&gt;</p></blockquote>
<p>One way around this limitation is use the GNU/Linux command <em>split</em> to divide the file into several smaller chunks, which are in turn stored in Amazon&#8217;s S3. It&#8217;s important to know the order of these chunks as the original file is split. The good news is that the split command preserves the order of the chunks by adding a suffix to each chunk. Here&#8217;s an example of the split command in action. In this example, we&#8217;re splitting file outfile.tmp, which is of size 2.3GB, into chunks of 1GB each:</p>
<blockquote><p># du -sh outfile.tmp<br />
2.3G    outfile.tmp</p>
<p># split -a 1 -b 1073741824 outfile.tmp outfile.tmp.</p>
<p># ls -alh outfile.tmp.*<br />
-rw-r&#8211;r&#8211; 1 root root 1.0G Apr 11 09:51 outfile.tmp.a<br />
-rw-r&#8211;r&#8211; 1 root root 1.0G Apr 11 09:51 outfile.tmp.b<br />
-rw-r&#8211;r&#8211; 1 root root 274M Apr 11 09:51 outfile.tmp.c</p></blockquote>
<p>As you can see, split is appending alphabetical letters to the end of the split file name. This comes handy when reassembling the file. Here&#8217;s a quick proof of concept following our earlier example:</p>
<blockquote><p># <strong>md5sum outfile.tmp</strong><br />
<strong>e1f4bbcfc2309b3c7ea48028c3f1c9e9</strong> outfile.tmp<br />
# cat outfile.tmp.a outfile.tmp.b outfile.tmp.c &gt; reassembled.tmp<br />
# <strong>md5sum reassembled.tmp </strong><br />
<strong>e1f4bbcfc2309b3c7ea48028c3f1c9e9</strong> reassembled.tmp</p></blockquote>
<p>All as planned! That&#8217;s all folks.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.unixy.net/2009/04/amazons-s3-file-size-limitation-solved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
