-
-
Save camilb/fac501acf8ce017eae244b285ac8c971 to your computer and use it in GitHub Desktop.
Revisions
-
pgchamberlin revised this gist
Nov 17, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,9 +12,9 @@ But this does not produce an exact copy of the zonefile, for example the existin ## Hosting DNS with multiple providers If your use case for this command is for duplicating zone files across multiple DNS hosts then the records should be identical in each location. Specifically: you need all the SOA serial numbers to be in sync. That's why the `--editauth` flag exists. It tells `cli53` to overwrite the SOA record with whatever's in the incoming zone file, giving you a set of changes that replicate exactly the imported zone. If you leave off the `--editauth` flag there will be no alarms. The SOA serial numbers will be out of sync silently, and the resilience of your multi-hosted DNS will be compromised without you knowing. So it's really worth remembering. -
pgchamberlin created this gist
Nov 17, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ # Replace a zone file in AWS Route53 using cli53 [`cli53`](https://github.com/barnybug/cli53) is a command line tool for Amazon Route53 and it's [well documented](https://github.com/barnybug/cli53#getting-started). Basic syntax to replace a BIND zone file is very simple: ``` cli53 import --file zonefile.txt --replace example.com ``` But this does not produce an exact copy of the zonefile, for example the existing SOA record will not be replaced. ## Hosting DNS with multiple providers If your use case for this command is for duplicating zone files across multiple DNS hosts then the records should be identical in each location. Specifically: you need all the `SOA` serials to be in sync. That's why the `--editauth` flag exists. It tells `cli53` to overwrite the `SOA` record with whatever's in the incoming zone file, giving you a set of changes that replicate exactly the imported zone. If you leave off the `--editauth` flag there will be no alarms. The SOA serial numbers will be out of sync silently, and the resilience of your multi-hosted DNS will be compromised without you knowing. So it's really worth remembering. I also think it's worth waiting for AWS to make the changes (using the `--wait` flag). Like this: ``` cli53 import --file zonefile.txt --replace --wait --editauth example.com ``` ## Dry run the changes If you add the `--dry-run` flag then `cli53` will show you a diff of the changes it will make. I recommend using it for every change.