{"id":105494,"date":"2020-11-05T16:00:42","date_gmt":"2020-11-05T13:00:42","guid":{"rendered":"https:\/\/en.buradabiliyorum.com\/how-to-backup-an-s3-bucket-and-why-youd-even-want-to-cloudsavvy-it\/"},"modified":"2020-11-05T16:00:42","modified_gmt":"2020-11-05T13:00:42","slug":"how-to-backup-an-s3-bucket-and-why-youd-even-want-to-cloudsavvy-it","status":"publish","type":"post","link":"https:\/\/buradabiliyorum.com\/en\/how-to-backup-an-s3-bucket-and-why-youd-even-want-to-cloudsavvy-it\/","title":{"rendered":"#How To Backup an S3 Bucket (And Why You\u2019d Even Want To) \u2013 CloudSavvy IT"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a407ed4e9027\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #dd3333;color:#dd3333\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #dd3333;color:#dd3333\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a407ed4e9027\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-backup-an-s3-bucket-and-why-youd-even-want-to-cloudsavvy-it\/#Prevent_Accidental_Deletion_with_Object_Versioning\" >Prevent Accidental Deletion with Object Versioning<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-backup-an-s3-bucket-and-why-youd-even-want-to-cloudsavvy-it\/#Saving_Your_Wallet_With_Lifecycle_Rules\" >Saving Your Wallet With Lifecycle Rules<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-backup-an-s3-bucket-and-why-youd-even-want-to-cloudsavvy-it\/#Replicate_the_Bucket_Across_Regions\" >Replicate the Bucket Across Regions<\/a><\/li><\/ul><\/nav><\/div>\n<p><strong>&#8220;#How To Backup an S3 Bucket (And Why You\u2019d Even Want To) \u2013 CloudSavvy IT&#8221;<\/strong><\/p>\n<div id=\"article-content-area\">\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5269\" src=\"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/0eb3564906a864c93706b30eaca199af\/p\/uploads\/2020\/06\/e601b806.png\" alt=\"AWS Logo\" width=\"700\" height=\"300\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>At first, this can seem a bit paradoxical; after all, S3 is usually used as a backup for other services. But, it doesn\u2019t protect from accidental deletions or overwrites, and for mission critical data, you can pay extra to have the bucket replicated across regions.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Prevent_Accidental_Deletion_with_Object_Versioning\"><\/span>Prevent Accidental Deletion with Object Versioning<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Let\u2019s make one thing clear first\u2014data in S3 is incredibly safe. It\u2019s used for backups, so it doesn\u2019t make much sense to backup your backup unless you\u2019re really paranoid about losing your data.<\/p>\n<p>And while S3 data is definitely safe from individual drive failures due to RAID and other backups, it\u2019s also safe from disaster scenarios like widespread outages or warehouse failure. Unlike EBS-backed data volumes, which are stored in one place and can fail completely, S3 is already \u201cbacking up your data.\u201d Data in S3 is stored in three or more Availability Zones, which means even in the event one of them burns down, you still have two more backups.<\/p>\n<p>What S3 doesn\u2019t protect you from is <em>yourself<\/em>. It\u2019s much, much more likely that you, or someone else with access, will accidentally delete something, or overwrite an important object with garbage data. This is the scenario that you should be worried about.<\/p>\n<p>To protect against this, S3 has a feature called Object Versioning. It stores every different version of each object, so if you accidentally overwrite it, you can restore a previous version. You can also fetch previous versions at any time <a rel=\"nofollow noopener noreferrer\" target=\"_blank\" href=\"http:\/\/redirect.viglink.com?u=https%3A%2F%2Fdocs.aws.amazon.com%2FAmazonS3%2Flatest%2Fdev%2FRetrievingObjectVersions.html&amp;key=204a528a336ede4177fff0d84a044482\">by passing that as a parameter to the GET request<\/a>.<\/p>\n<p>When versioning is enabled, rather than deleting objects directly, S3 marks the object with a \u201cDeletion Marker\u201d that causes it to act like it\u2019s gone, but in the event that you didn\u2019t mean to delete it, it\u2019s reversible.<\/p>\n<p>With a lifecycle policy in place (more on that below) bucket versioning shouldn\u2019t cost much extra as old versions won\u2019t be stored for long. It\u2019s off by default, but both Amazon and us recommend that you enable it if you can spare the storage increase.<\/p>\n<p>To enable it, open up the bucket\u2019s settings, click \u201cProperties,\u201d and click \u201cEdit\u201d on Bucket Versioning.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-7786\" src=\"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/377ec9c2f32f60c8a7dbef853181a08f\/p\/uploads\/2020\/11\/07b0a444.png\" alt=\"\" width=\"700\" height=\"428\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>From here, you can simply turn it on.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-7787\" src=\"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/8f52d45eadddeeddec316d30f20f045f\/p\/uploads\/2020\/11\/2b7d8367.png\" alt=\"\" width=\"700\" height=\"325\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Saving_Your_Wallet_With_Lifecycle_Rules\"><\/span>Saving Your Wallet With Lifecycle Rules<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Of course, storing multiple copies of objects uses way more space, especially if you\u2019re frequently overwriting data. You probably don\u2019t need to store these old versions for the rest of eternity, so you can do your wallet a favor by setting up a Lifecycle rule that will remove the old versions after some time.<\/p>\n<p>Under Management &gt; Life Cycle Configuration, add a new rule. The two options available are moving old objects to an infrequent access tier, or deleting them permanently after<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-7784\" src=\"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/962ef63542dd943b28e23586ba56068b\/p\/uploads\/2020\/11\/01f6af2e.png\" alt=\"\" width=\"700\" height=\"589\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>In case you\u2019re anxious you miss-clicked and this rule is going to delete working data, you\u2019ll see at the bottom that the rule actions only <a href=\"https:\/\/buradabiliyorum.com\/en\/category\/download-scripts-themes-apps\/\" data-internallinksmanager029f6b8e52c=\"9\" title=\"Download Scripts &amp; Themes &amp; Apps\" target=\"_blank\" rel=\"noopener\">app<\/a>ly 30 days after an object becomes noncurrent. There\u2019s no rule that will permanently delete working data, only expire it, which is recoverable.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-7785\" src=\"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/c1cd015178e10e2a1f8066307bcfbbd5\/p\/uploads\/2020\/11\/4b8e4365.png\" alt=\"\" width=\"700\" height=\"316\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Replicate_the_Bucket_Across_Regions\"><\/span>Replicate the Bucket Across Regions<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>If you really want to backup the entire S3 bucket, you can do so with another bucket and a replication rule. This rule will automatically replicate all actions in the target bucket.<\/p>\n<p>You can set it up from the \u201cReplication\u201d tab under \u201cManagement.\u201d<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5107\" src=\"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/a45398ff088c8c369ea9093175b5d05e\/p\/uploads\/2020\/06\/408829e1-1.png\" alt=\"add replication rule\" width=\"700\" height=\"297\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>Set the source configuration (either the whole bucket or a prefix\/tag) and set the target bucket:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"imgchk9 alignnone wp-image-5109 size-full\" src=\"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/69d18caa512d0467a9fcf272d6935ba9\/p\/uploads\/2020\/06\/fc15cd66.png\" alt=\" Select the destination bucket\" width=\"700\" height=\"369\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>You will need to create an IAM role for replication; S3 will handle the configuration, just give it a name.<\/p>\n<p>Click \u201cNext,\u201d and click \u201cSave.\u201d The rule should be active im<a href=\"https:\/\/buradabiliyorum.com\/en\/category\/social-mediaa\/\" data-internallinksmanager029f6b8e52c=\"1\" title=\"Social Media\" target=\"_blank\" rel=\"noopener\">media<\/a>tely; you can test uploading an object, and you should see it replicated to the destination bucket, then you\u2019ll see the replication status tag change to <code>COMPLETED<\/code>.\n<\/div>\n<blockquote>\n<p style=\"text-align: center;\">For forums sites go to <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/forum.buradabiliyorum.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">Forum.BuradaBiliyorum.Com<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\"><strong>If you want to read more like this article, you can visit our <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/en.buradabiliyorum.com\/technology\/\" target=\"_blank\" rel=\"noopener noreferrer\">Technology category.<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<p><span style=\"color: black;\"><a style=\"color: #ff9900;\" href=\"https:\/\/www.cloudsavvyit.com\/7782\/how-to-backup-an-s3-bucket-and-why-youd-even-want-to\/\" target=\"_blank\" rel=\"noopener noreferrer\">Source<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;#How To Backup an S3 Bucket (And Why You\u2019d Even Want To) \u2013 CloudSavvy IT&#8221; At first, this can seem a bit paradoxical; after all, S3 is usually used as a backup for other services. But, it doesn\u2019t protect from accidental deletions or overwrites, and for mission critical data, you can pay extra to have&#8230;<\/p>\n","protected":false},"author":1,"featured_media":105495,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2020\/06\/e601b806.png","fifu_image_alt":"","footnotes":""},"categories":[18],"tags":[],"class_list":["post-105494","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/105494","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/comments?post=105494"}],"version-history":[{"count":0,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/105494\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media\/105495"}],"wp:attachment":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media?parent=105494"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/categories?post=105494"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/tags?post=105494"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}