}
// Evaluate filters (and possibly fail) before writing to the filesystem.
- bool filter_zonefile, filter_journal, filter_timers, filter_kaspdb, filter_catalog;
+ bool filter_zonefile, filter_journal, filter_timers, filter_kaspdb,
+ filter_catalog, filter_quic;
// The default filter values are set just in this paragraph.
if (!(eval_opposite_filters(args, &filter_zonefile, true,
eval_opposite_filters(args, &filter_kaspdb, true,
CTL_FILTER_BACKUP_KASPDB, CTL_FILTER_BACKUP_NOKASPDB) &&
eval_opposite_filters(args, &filter_catalog, true,
- CTL_FILTER_BACKUP_CATALOG, CTL_FILTER_BACKUP_NOCATALOG))) {
+ CTL_FILTER_BACKUP_CATALOG, CTL_FILTER_BACKUP_NOCATALOG) &&
+ eval_opposite_filters(args, &filter_quic, false,
+ CTL_FILTER_BACKUP_QUIC, CTL_FILTER_BACKUP_NOQUIC))) {
return KNOT_EXPARAM;
}
ctx->backup_timers = filter_timers;
ctx->backup_kaspdb = filter_kaspdb;
ctx->backup_catalog = filter_catalog;
+ ctx->backup_quic = filter_quic;
zone_backups_add(&args->server->backup_ctxs, ctx);
-/* Copyright (C) 2022 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
+/* Copyright (C) 2023 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#define CTL_FILTER_BACKUP_NOKASPDB 'K'
#define CTL_FILTER_BACKUP_CATALOG 'c'
#define CTL_FILTER_BACKUP_NOCATALOG 'C'
+#define CTL_FILTER_BACKUP_QUIC 'q'
+#define CTL_FILTER_BACKUP_NOQUIC 'Q'
#define STATUS_EMPTY "-"
bool backup_timers; // if true, also backup timers
bool backup_kaspdb; // if true, also backup KASP database
bool backup_catalog; // if true, also backup zone catalog
+ bool backup_quic; // if true, also backup QUIC server key and certificate
bool backup_global; // perform global backup for all zones
ssize_t readers; // when decremented to 0, all zones done, free this context
pthread_mutex_t readers_mutex; // mutex covering readers counter
"finished_time: %s\n"
"knot_version: %s\n"
"parameters: +%szonefile +%sjournal +%stimers +%skaspdb +%scatalog "
- "+backupdir %s\n"
+ "+%squic +backupdir %s\n"
"zone_count: %d\n",
label_file_head,
ctx->backup_format, ident, started_time, finished_time, PACKAGE_VERSION,
ctx->backup_timers ? "" : "no",
ctx->backup_kaspdb ? "" : "no",
ctx->backup_catalog ? "" : "no",
+ ctx->backup_quic ? "" : "no",
ctx->backup_dir,
ctx->zone_count);
return ctl_receive(args);
}
-#define MAX_FILTERS 12
+#define MAX_FILTERS 14
typedef struct {
const char *name;
{ "+nokaspdb", CTL_FILTER_BACKUP_NOKASPDB, false },
{ "+catalog", CTL_FILTER_BACKUP_CATALOG, false },
{ "+nocatalog", CTL_FILTER_BACKUP_NOCATALOG, false },
+ { "+quic", CTL_FILTER_BACKUP_QUIC, false },
+ { "+noquic", CTL_FILTER_BACKUP_NOQUIC, false },
};
const filter_desc_t zone_status_filters[MAX_FILTERS] = {