These are chat archives for CZ-NIC/knot-resolver

1st
Mar 2017
igregr
@igregr
Mar 01 2017 12:29
Hello, is there a way, how to dump the entire cache?
Vladimír Čunát
@vcunat
Mar 01 2017 12:32
@igregr: not really.
Certainly not the whole contents.
Ondřej Surý
@oerdnj
Mar 01 2017 12:33
igregr: but it's a standard lmdb database, so you can write an utility; or use redis/memcached backend and you can work with cache contents directly
you would just need to decode the data
@johnathonm_twitter: with virtualization being so common (even on Windows) there's a little motivation to do a direct Windows port
Vladimír Čunát
@vcunat
Mar 01 2017 12:35
The current state what you can get looks like this:
> cache.get('cz')
[c.ns.nic.cz] => {
    [A] => true
    [AAAA] => true
}
[cz] => {
    [NS] => true
    [DNSKEY] => true
    [DS] => true
}
[seznam.cz] => {
    [NS] => true
}
[ans.seznam.cz] => {
    [A] => true
    [AAAA] => true
}
[www.seznam.cz] => {
    [A] => true
}
[hc3bc4rs8r2ai3kioqv5c3ktorkc39h4.cz] => {
    [NSEC3] => true
}
[ams.seznam.cz] => {
    [A] => true
    [AAAA] => true
}
[b.ns.nic.cz] => {
    [A] => true
    [AAAA] => true
}
[a.ns.nic.cz] => {
    [A] => true
    [AAAA] => true
}
[d.ns.nic.cz] => {
    [A] => true
    [AAAA] => true
}
Petr Špaček
@pspacek
Mar 01 2017 12:35
I think that igregr would be okay with a Lua snippet which returns the data, AFAIK he does not need to extract the data without kresd.
In other words, he could use kresd's decoding functions in Lua if we can give him hint how to use them.