I copied the update-data.sh script to the second server to bring in the same data so AXFR or rsync isn't required ...
If you for one or another reason choose to use this method, I'd like to draw your attention to the fact that there can be pitfalls:
* Do NOT host the domain your nameservers are in _on_ the servers themself while at the same time using a hostname in that domain for locating your vegadns installation. It can create a circular dependency, like the following: 1. "domain.com" is hosted by a.ns.domain.com and b.ns.domain.com 2. a.ns and b.ns pulls the data from www1.domain.com 3. The webserver on www1 goes down or fails for one reason or another 4. a.ns and b.ns updates with invalid/corrupt/no data 5. The A-record for www1.domain.com becomes unavailable 6. www1 comes back online 7. a.ns and b.ns can't resolve the server where vegadns is kept 8. Goto to step 4
Either use another domain for the URL or just the plain IP for the name. Or another method.. :o)
Here's a patch that for now fixes at least one of the possible disasters - that of data.cdb being regenerated with ZERO data. There seems to be no simple way of telling wget NOT to write to the output file if the file transfer fails?
--- DOWNLOAD/vegadns-0.7/update-data.sh Thu Apr 22 21:50:45 2004
+++ /usr/share/vegadns/update-data.sh Tue May 4 12:27:39 2004
@@ -17,4 +17,7 @@
wget -q -O "$TINYDNSDIR/root/data.srv-$A" $VD?state=get_data
cat "$TINYDNSDIR/root/data.srv-$A" >>$TINYDNSDIR/root/data
done
-(cd $TINYDNSDIR/root ; make -s)
+if [ -s $TINYDNSDIR/root/data ]
+then \
+ (cd $TINYDNSDIR/root ; make -s)
+fi//conny
