Method of writing zone files

Marcus Frenkel marcus.frenkel at gmail.com
Mon Nov 12 19:39:14 UTC 2018


Thank you for the quick reply Tony!

Follow-up questions just to be sure:
1. The new zone file is renamed in the placed of the old one, only after
all changes to the new file are written?
2. Is the zone file atomically replaced during the renaming process, in a
sense that there is no window in which the file is empty or non-existent?

I'm running BIND on Debian 9. Based on this
<http://man7.org/linux/man-pages/man2/rename.2.html> Linux man page, the
rename function should be atomic. I would not imagine that BIND does it in
different way, like the worst case scenario to first remove the current
file and then move the new one to the same path. I know I'm too
cautious, I'm just trying to avoid any chance for rsync to transfer
incomplete or empty zone file, or maybe delete the file at the destination
if it does not exist at the source for a short moment.

Marcus

On Mon, Nov 12, 2018 at 7:19 PM Tony Finch <dot at dotat.at> wrote:

> Marcus Frenkel <marcus.frenkel at gmail.com> wrote:
> >
> > I need to know how BIND writes to slave zone files after zone has been
> > updated. Does it modify the file in place or it replaces the file with
> > new one at once?
>
> Changes are written to a journal append-only style. Every so often the
> master file is rewritten to incorporate the contents of the journal; this
> is done by writing to a new file and renaming it in place of the old one.
>
> Tony.
> --
> f.anthony.n.finch  <dot at dotat.at>  http://dotat.at/
> sovereignty rests with the people and authority
> in a democracy derives from the people
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/bind-users/attachments/20181112/d0c27c8d/attachment.html>


More information about the bind-users mailing list