{"id":653,"date":"2017-10-19T10:12:40","date_gmt":"2017-10-19T10:12:40","guid":{"rendered":"http:\/\/wiki.thomasandsofia.com\/?p=653"},"modified":"2017-10-20T02:50:47","modified_gmt":"2017-10-20T02:50:47","slug":"rds-backups-and-scaling","status":"publish","type":"post","link":"https:\/\/wiki.thomasandsofia.com\/?p=653","title":{"rendered":"RDS Backups and Scaling"},"content":{"rendered":"<p><a href=\"https:\/\/www.udemy.com\/aws-certified-solutions-architect-associate\/learn\/v4\/t\/lecture\/4782126?start=0\" target=\"_blank\" rel=\"noopener\">https:\/\/www.udemy.com\/aws-certified-solutions-architect-associate\/learn\/v4\/t\/lecture\/4782126?start=0<\/a><\/p>\n<h2>Automated Backups<\/h2>\n<p>Automated Backups allow you to recover your database to any point in time within a &#8220;retention period&#8221;. Retention period can be between 1 and 35 days.\u00a0 (Default 7 Days.)\u00a0 Automated Backups will take a full daily snapshot and will also store transaction logs throughout the day.\u00a0 When you do a recovery, AWS will first choose the most recent daily backup, then apply transaction logs relevant to that day.\u00a0 This allows you to do a &#8220;point in time&#8221; recovery down a second, within the retention period.<\/p>\n<p>Automated Backups are enabled by default.\u00a0 The backup data is stored in S3 and you get free storage space equal to the size of your database.\u00a0 So if you have an RDS instance of 10GB, you will get 10GB worh of storage.<\/p>\n<p>Backups are taken within a defined window.\u00a0 During the backup window, storage I\/O may be suspended while your data is being backed up and you may experience elevated latency.<\/p>\n<h2>DB Snapshots<\/h2>\n<p>DB Snapshots are done manually.\u00a0 They are stored even after you delete the original RDS instance, unlike automated backups.<\/p>\n<div class=\"warning\">Whenever you restore either an Automated Backup or a manual Snapshot, the restored version of the database will be a new RDS instance with a new endpoint (domain?).<\/div>\n<p>&nbsp;<\/p>\n<h2>Encryption<\/h2>\n<p>Encryption at rest is supported for MySQL, Oracle, SQL Server, PostgreSQL &amp; MariaDB.\u00a0 Encryption is done using AWS Key Management Service (KMS).\u00a0 Once an RDS instance is encrypted, the data stored at rest in the underlying storage is encrypted, as are its automated backups, read replicas and snapshots.<\/p>\n<p>You cannot directly encrypt an existing DB instance.\u00a0 Instead, create a new instance with encryption enabled, then migrate your data into it.<\/p>\n<h2>Restoring an RDS Database<\/h2>\n<ul>\n<li>You can copy a snapshot to different regions to create a DR site.<\/li>\n<li>You can re-scale an instance by restoring a snapshot to a new DB Instance Class.<\/li>\n<\/ul>\n<h2>Multi-AZ<\/h2>\n<p>Multi-AZ instances use asynchronous replication to a different Availability Zone.\u00a0 If the primary instance fails, AWS will automatically failover to the second location and will continue to use the same DNS endpoint, so there is no need to reconfigure your connecting instances.<\/p>\n<p>Multi-AZ allows you to have an exact copy of your production database in another Availability Zone.\u00a0 AWS handles the replication for you, so when your production database is written to, this write will automatically be synchronized to the stand by database.<\/p>\n<p>In the event of planned database maintenance, DB Instance failure, or an Availability Zone failure, RDS will automatically failover to the standby so that database operations can resume quickly without administrative intervention.<\/p>\n<div class=\"warning\">Multi-AZ is for Disaster Recovery only.\u00a0 It is not primarily used for improving performance.\u00a0 For performance improvement, you need Read Replicas.<\/div>\n<p>&nbsp;<\/p>\n<h2>Read Replica<\/h2>\n<p>Read Replicas are Read-Only replicas of your database.\u00a0 These allow different web instances to read from different replicas in order to improve performance.\u00a0 A single database may have up to 5 Read Replica copies.<\/p>\n<p>Read Replicas allow you to have a read only copy of your production database.\u00a0 This is achieved by using Asynchronous replication from the Primary RES instance to the read replica.\u00a0 You use read replicas primarily for read-heavy database workloads.<\/p>\n<ul>\n<li>You must have automatic Backups enabled in order to deploy read replicas.<\/li>\n<li>Read replicas are NOT to be used for HA \/ DR.\u00a0 Use Multi-AZ for that.<\/li>\n<li>You can have read replicas of read replicas, but watch out for latency issues.<\/li>\n<li>Each read replica will have its own DNS endpoint.<\/li>\n<li>You cannot have Read Replicas that have Multi-AZ<\/li>\n<li>You can create Read Replicas of Multi-AZ source databases.<\/li>\n<li>Read Replicas can be promoted to be their own databases, however this breaks the replication.<\/li>\n<li>MySQL and MariaDB allow Read Replicas to be placed in a different Region.\u00a0 This is not available for PostgreSQL, SQL Server or Oracle.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/www.udemy.com\/aws-certified-solutions-architect-associate\/learn\/v4\/t\/lecture\/4782126?start=0 Automated Backups Automated Backups allow you to recover your database to any point in time within a &#8220;retention period&#8221;. Retention period can be between 1 and 35 days.\u00a0 (Default 7 Days.)\u00a0 Automated Backups will take a full daily snapshot and will also store transaction logs throughout the day.\u00a0 When you do a recovery, AWS ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/wiki.thomasandsofia.com\/?p=653\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,20],"tags":[],"class_list":["post-653","post","type-post","status-publish","format-standard","hentry","category-amazon-web-services-aws","category-aws-databases"],"_links":{"self":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/653","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=653"}],"version-history":[{"count":7,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/653\/revisions"}],"predecessor-version":[{"id":660,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/653\/revisions\/660"}],"wp:attachment":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=653"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=653"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=653"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}