Skip to main content

Backup and restore Route53 zones, or transfer between AWS accounts.

Project description

Quickly backup and restore AWS Route53 DNS zones.

## Motivation

route53-transfer-ng started as a pull-request to [route53-transfer](https://github.com/cosmin/route53-transfer) and slowly turned into a port to boto3 of that software, and then finally a complete rewrite.

I intentionally avoided retaining compatibility with the original code. In fact, route53-transfer-ng does not use the CSV format anymore, as that wouldn’t easily allow support for all the Route53 routing policies and features.

## Installation

pip install route53-transfer-ng

## Usage

List all the hosted zones in the current AWS account (use the AWS_PROFILE environment variable to control which account is active):

route53-transfer-ng zones

Backup the example.com zone to a YAML file:

route53-transfer-ng dump –format yaml example.com example.com.yaml

Use STDOUT instead of a file:

route53-transfer-ng dump –format yaml example.com -

Restore the example.com zone from a YAML file:

route53-transfer-ng load –format yaml example.com example.com.yaml

To perform a dry run load, add the –dry-run option switch. The command will show the changes that would be made to the R53 zone without carrying out any operation.

route53-transfer-ng –dry-run load example.com example.com.yaml

It’s possible to use upsert operations when performing a route53 change operation, instead of the default DELETE + CREATE of recordsets. To enable this behaviour, supply the –use-upserts option.

route53-transfer-ng –dry-run –use-upserts load example.com example.com.yaml

Use - as filename to load from STDIN instead.

Migrate between accounts:

Use the AWS_PROFILE environment variable to change the AWS account to be used by route53-transfer-ng. Dump from one account, load into another.

AWS_PROFILE=aws_account1 route53-transfer dump example.com test.yaml AWS_PROFILE=aws_account2 route53-transfer load example.com test.yaml

## Credits

Thanks to Cosmin Sterejan for the original [route53-transfer](https://github.com/cosmin/route53-transfer) that I used for some time as-is and then as base and inspiration for this boto3 “ng” version.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

route53_transfer_ng-1.0.8.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

route53_transfer_ng-1.0.8-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file route53_transfer_ng-1.0.8.tar.gz.

File metadata

  • Download URL: route53_transfer_ng-1.0.8.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for route53_transfer_ng-1.0.8.tar.gz
Algorithm Hash digest
SHA256 e94905a287e75c2f3c443b67158e2092b212d318adc874b62f9897a384053dbc
MD5 d51c47daf78c8e7c20558220e8b9faf9
BLAKE2b-256 4aeaa35455089eef3b94efb8e8e9c6e697fcd3bae55c5a253b4044cffe425c16

See more details on using hashes here.

File details

Details for the file route53_transfer_ng-1.0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for route53_transfer_ng-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 9fef93bb7c099269f3a7ebe781bb8a2df20b0b7e63cb9ce46604e2a5690ddb67
MD5 4c6ba9054788a29444a94cb3d70915ef
BLAKE2b-256 6da536774e2044249c959308b76ea9000f710d37679657a85cabae39c9dfa81f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page