---
title: "Clone S3 Bucket Script"
description: "<p>I had to backup an S3 bucket so I whiped out a small script to clone a bucket.</p>
<p>It’s written in Python and depends on the excellent <a href="http://code.google.com/p/boto/">Boto library</a>. If you are running Python &lt; 2.7 you’ll also need the <a href="http://code.google.com/p/argparse/">argparse library</a> (both available also via pip).</p>
<p>View the gist here: <a href="https://gist.github.com/1275085">https://gist.github.com/1275085</a></p>
<p>Or here below:</p>"
doc_version: "1"
last_updated: "2017-06-02"
date: 2011-10-10
tags: [Amazon S3, Amazon Simple Storage Service, Bucket, Clone, Code, gist, S3]
canonical: "https://eran.sandler.co.il/2011/10/10/clone-s3-bucket-script/"
---

## Sitemap

- [Home](https://eran.sandler.co.il/)

I had to backup an S3 bucket so I whiped out a small script to clone a bucket.

It&#8217;s written in Python and depends on the excellent [Boto library][1]. If you are running Python < 2.7 you&#8217;ll also need the [argparse library][2] (both available also via pip).

View the gist here: <https://gist.github.com/1275085>

Or here below:

 [1]: http://code.google.com/p/boto/
 [2]: http://code.google.com/p/argparse/