Backup Route53 to S3

Ryan Babchishin <rbabchishin@win2ix.ca>

Win2ix Systems Inc. http://www.win2ix.ca

r53dump is a shell script that will connect to AWS Route53 service and dump all zones in Bind format for the specified account. Logging is done to syslog (check /var/log/syslog). Multiple accounts, multilpe zones are supported. “cli53” is used for all connectivity with AWS systems. Dumped zones can optionally be sent to s3 automatically.

Usage/Setup:

1) Install r53dump

git clone https://github.com/Win2ix/r53dump.git

2) Install cli53

git clone https://github.com/barnybug/cli53.git

3) Install s3cmd (available via apt-get on Ubuntu/Debian) or download

http://s3tools.org/s3cmd

4) Create /etc/r53dump.conf and add this (or copy a working one)

# Path to cli53 binary

cli53=/usr/local/bin/cli53

s3cmd=s3cmd

s3bucket=”s3://your-bucket”

5) Set your AWS access keys in one file per account (like win2ix.auth). You can have more than one.

The format is like this:

export AWS_ACCESS_KEY_ID=AKIAJGNWBPJJKSWCHEMZ

export AWS_SECRET_ACCESS_KEY=’2ma263OF+16cLlWWl0eS2MdLZa/SdhSTXHGgBAt9′

6) Start r53dump

./r53dump authConfigFile saveDirectory

authConfigFile = the file created in step 5

saveDirectory = a directory to store downloaded zone files