From e2820239f598599b016a1070197131b4e41744b8 Mon Sep 17 00:00:00 2001
From: Libor Peltan <libor.peltan@nic.cz>
Date: Thu, 11 Feb 2021 09:41:27 +0100
Subject: [PATCH] backup: better warning wording

---
 src/knot/ctl/commands.c | 2 +-
 src/knot/zone/backup.c  | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/knot/ctl/commands.c b/src/knot/ctl/commands.c
index 54c309f65a..f7eba65a9a 100644
--- a/src/knot/ctl/commands.c
+++ b/src/knot/ctl/commands.c
@@ -451,7 +451,7 @@ static int zone_backup_cmd(zone_t *zone, ctl_args_t *args)
 {
 	zone_backup_ctx_t *ctx = latest_backup_ctx(args);
 	if (zone->backup_ctx != NULL) {
-		log_zone_warning(zone->name, "zone backup already in progress, skipping zone");
+		log_zone_warning(zone->name, "backup already in progress, skipping zone");
 		return KNOT_EOK;
 	}
 	zone->backup_ctx = ctx;
diff --git a/src/knot/zone/backup.c b/src/knot/zone/backup.c
index 348de17dc5..4615ffedfa 100644
--- a/src/knot/zone/backup.c
+++ b/src/knot/zone/backup.c
@@ -1,4 +1,4 @@
-/*  Copyright (C) 2020 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
+/*  Copyright (C) 2021 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
@@ -139,7 +139,8 @@ void zone_backups_deinit(zone_backup_ctxs_t *ctxs)
 {
 	zone_backup_ctx_t *ctx, *nxt;
 	WALK_LIST_DELSAFE(ctx, nxt, ctxs->ctxs) {
-		log_warning("backup in progress, terminating, will be incomplete");
+		log_warning("backup to '%s' in progress, terminating, will be incomplete",
+		            ctx->backup_dir);
 		ctx->readers = 1; // ensure full deinit
 		zone_backup_deinit(ctx);
 	}
-- 
GitLab