Created
January 28, 2015 19:00
-
-
Save luelista/238b73582293a5cf13cb to your computer and use it in GitHub Desktop.
Zone transfer to secondary name server via mysqldump...
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 characters
zone.txt: last_change | |
pdnssec rectify-all-zones | |
echo "SELECT name,type,content from records;" | mysql pdns > new_zone.txt | |
diff zone.txt new_zone.txt > zone.diff | |
rm zone.txt | |
mv new_zone.txt zone.txt | |
gzip --stdout zone.diff > diffs/zone.diff.$(date +"%Y%m%d%H%M") | |
mysqldump pdns | ssh -i /root/.ssh/copydns_key ns3.teamwiki.net "mysql pdns" | |
# maybe you want this mailed or jabbered somewhere | |
# cat zone.diff | mail -s "Zone file changes" root | |
# jabber [email protected] "Zone file changes\n $(cat zone.diff)" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment