Advertisement
Guest User

Untitled

a guest
Jan 28th, 2015
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1.  
  2. zone.txt: last_change
  3. pdnssec rectify-all-zones
  4.  
  5. echo "SELECT name,type,content from records;" | mysql pdns > new_zone.txt
  6. diff zone.txt new_zone.txt > zone.diff
  7. rm zone.txt
  8. mv new_zone.txt zone.txt
  9. gzip --stdout zone.diff > diffs/zone.diff.$(date +"%Y%m%d%H%M")
  10. mysqldump pdns | ssh -i /root/.ssh/copydns_key ns3.teamwiki.net "mysql pdns"
  11.  
  12. # maybe you want this mailed or jabbered somewhere
  13. # cat zone.diff | mail -s "Zone file changes" root
  14. # jabber somebody@example.com "Zone file changes\n $(cat zone.diff)"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement