Zonefile and journal with DDNS records problem
I need the zone which will save DDNS updates to journal and still use the zonefile content. I tried following configuration.
zonefile-sync: -1
zonefile-load: difference
journal-content: changes
Starting point configuration:
TERM1:$ cat example.com.zone
$TTL 3600
$ORIGIN example.com.
@ SOA services1.example.com. hostmaster.example.com. (
2022111504 ; Serial YYYYMMDDNN
28800 ; Refresh
7200 ; Retry
1209600 ; Expire
3600 ) ; Negative Cache TTL
@ NS services1.example.com.
@ NS services2.example.com.
TERM1:$ kjournalprint /var/lib/knot/journal/ example.com
warning: obsolete parameter specified
error: zone not exists in the journal DB /var/lib/knot/journal/
The journal is empty
TERM1:$
- Now I am going to make record to zonefile and increment serial.
file1 A 127.0.0.1
- Record file1 is working and journal is still empty. Now I am going to make DDNS record with knsupdate.
TERM1:$ cat make-ddns
server 127.0.0.1
zone example.com.
add journal1.example.com. A 127.0.0.2
show
send
answer
quit
TERM1:$ knsupdate make-ddns
Update query:
;; ->>HEADER<<- opcode: UPDATE; status: NOERROR; id: 40952
;; Flags: ; ZONE: 1; PREREQ: 0; UPDATE: 1; ADDITIONAL: 0
;; ZONE SECTION:
;; example.com. IN SOA
;; UPDATE SECTION:
journal1.example.com. 3600 IN A 127.0.0.2
Answer:
;; ->>HEADER<<- opcode: UPDATE; status: NOERROR; id: 19310
;; Flags: qr; ZONE: 1; PREREQ: 0; UPDATE: 0; ADDITIONAL: 0
;; ZONE SECTION:
;; example.com. IN SOA
TERM1:$
TERM2:$ kjournalprint /var/lib/knot/journal/ example.com
warning: obsolete parameter specified
;; Changes between zone versions: 2022111505 -> 2022111506, changeset: 1
;; Removed
example.com. 3600 SOA services1.example.com. hostmaster.example.com. 2022111505 28800 7200 1209600 3600
;; Added
example.com. 3600 SOA services1.example.com. hostmaster.example.com. 2022111506 28800 7200 1209600 3600
journal1.example.com. 3600 A 127.0.0.2
TERM2:$
- Both records are working, everything is fine. Now I am going to make another record to zonefile with serial higher then the serial in journal, like 2022111507. And the record from journal stop working.
Actual state:
TERM2:$ kjournalprint /var/lib/knot/journal/ example.com
warning: obsolete parameter specified
;; Changes between zone versions: 2022111505 -> 2022111506, changeset: 1
;; Removed
example.com. 3600 SOA services1.example.com. hostmaster.example.com. 2022111505 28800 7200 1209600 3600
;; Added
example.com. 3600 SOA services1.example.com. hostmaster.example.com. 2022111506 28800 7200 1209600 3600
journal1.example.com. 3600 A 127.0.0.2
TERM2:$
TERM1:$ cat example.com.zone
$TTL 3600
$ORIGIN example.com.
@ SOA services1.example.com. hostmaster.example.com. (
2022111507 ; Serial YYYYMMDDNN
28800 ; Refresh
7200 ; Retry
1209600 ; Expire
3600 ) ; Negative Cache TTL
@ NS services1.example.com.
@ NS services2.example.com.
file1 A 127.0.0.1
file2 A 127.0.0.3
TERM1:$
TERM1:$ host file1.example.com 127.0.0.1
Using domain server:
Name: 127.0.0.1
Address: 127.0.0.1#53
Aliases:
file1.example.com has address 127.0.0.1
TERM1:$ host file2.example.com 127.0.0.1
Using domain server:
Name: 127.0.0.1
Address: 127.0.0.1#53
Aliases:
file2.example.com has address 127.0.0.3
TERM1:$ host journal1.example.com 127.0.0.1
Using domain server:
Name: 127.0.0.1
Address: 127.0.0.1#53
Aliases:
Host journal1.example.com not found: 3(NXDOMAIN)
TERM1:$
I am probably doing something which is not possible to do? Is there some way to make this working?
Thank you!