备份nameserver配置文件:
sudo cp /etc/bind/named.conf.local /etc/bind/named.conf.local.bak
sudo cp /var/cache/bind/example.com.db /var/cache/bind/example.com.db.bak
sudo cp /var/cache/bind/192.168.1.db /var/cache/bind/192.168.1.db.bak
还原nameserver配置文件:
sudo cp /etc/bind/named.conf.local.bak /etc/bind/named.conf.local
sudo cp /var/cache/bind/example.com.db.bak /var/cache/bind/example.com.db
sudo cp /var/cache/bind/192.168.1.db.bak /var/cache/bind/192.168.1.db
需要注意的是,在还原配置文件之前,最好先备份当前的配置文件,以防止意外情况发生。