recover deleted bind db.* files using dig

4
How to recover deleted bind zone files?

Upload: miroslav-strugarevic

Post on 20-Jan-2016

110 views

Category:

Documents


0 download

DESCRIPTION

How to recover deleted bind db.* files using dig command.

TRANSCRIPT

Page 1: Recover deleted bind db.* files using dig

How to recover deletedbind zone files?

Page 2: Recover deleted bind db.* files using dig

MethodsIf you accidentally delete /etc/bind/db.* files use one of the following methods for recovery

- Restore from latest backup- Use dig to retrieve records from memory- Use file recovery utility called ext3grep

Important: Do not restart bind service until you recover the zone files!

Page 3: Recover deleted bind db.* files using dig

Using dnsutils (dig)1) Examine named.conf to see what zone files are available

cat /etc/bind/named.conf

2) Use dig with “advanced” options to format the output and save it to a filedig +nocmd +multiline +noadditional +noquestion \

+nostats +nocomments +nottlid localhost \ any | sed '1i $TTL 604800' > /etc/bind/db.local

3) Set proper file permissionschown root:bind /etc/bind/db.local

4) Reload named serviceservice named reload

Page 4: Recover deleted bind db.* files using dig

Thank you!