to indicate whether the record was added or deleted, and continues with
the resource record in master-file format.
-The ``-c`` option provides a mechanism to compact the journal starting
-with the specified serial. Note this option *must not* be used while
-``named`` is running and can cause data loss if the the zone file does
-not contain the data that is being remove. Use with extreme caution.
+The ``-c`` (compact) option provides a mechanism to reduce the size of
+a journal by removing (most/all) transactions prior to the specified
+serial number. Note: this option *must not* be used while ``named`` is
+running, and can cause data loss if the zone file has not been updated
+to contain the data being removed from the journal. Use with extreme caution.
The ``-x`` option causes additional data about the journal file to be
printed at the beginning of the output and before each group of changes.
to indicate whether the record was added or deleted, and continues with
the resource record in master\-file format.
.sp
-The \fB\-c\fP option provides a mechanism to compact the journal starting
-with the specified serial. Note this option \fImust not\fP be used while
-\fBnamed\fP is running and can cause data loss if the the zone file does
-not contain the data that is being remove. Use with extreme caution.
+The \fB\-c\fP (compact) option provides a mechanism to reduce the size of
+a journal by removing (most/all) transactions prior to the specified
+serial number. Note: this option \fImust not\fP be used while \fBnamed\fP is
+running, and can cause data loss if the zone file has not been updated
+to contain the data being removed from the journal. Use with extreme caution.
.sp
The \fB\-x\fP option causes additional data about the journal file to be
printed at the beginning of the output and before each group of changes.
return (result);
}
+ /*
+ * Always perform a re-write when processing a version 1 journal.
+ */
+ rewrite = j1->header_ver1;
+
/*
* Check whether we need to rewrite the whole journal
* file (for example, to upversion it).
INSIST(best_guess.serial != j1->header.end.serial);
if (best_guess.serial != serial) {
CHECK(journal_next(j1, &best_guess, false));
+ serial = best_guess.serial;
}
/*