From: Alain Spineux Date: Fri, 18 Nov 2022 15:30:42 +0000 (+0100) Subject: initialize encrypted volume when recycling with rewrite_volume_label() X-Git-Tag: Beta-15.0.0~353 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=445c3921dc46f24d19c38f2bdf6b06b1cece078c;p=thirdparty%2Fbacula.git initialize encrypted volume when recycling with rewrite_volume_label() --- diff --git a/bacula/src/stored/label.c b/bacula/src/stored/label.c index 77412aaf9..8362a1581 100644 --- a/bacula/src/stored/label.c +++ b/bacula/src/stored/label.c @@ -598,6 +598,9 @@ bool DEVICE::rewrite_volume_label(DCR *dcr, bool recycle) } } + if (!load_encryption_key(dcr, "LABEL", dcr->VolumeName, &VolHdr.EncCypherKeySize, VolHdr.EncCypherKey, &VolHdr.MasterKeyIdSize, VolHdr.MasterKeyId)) { + return false; + } if (!write_volume_label_to_block(dcr)) { Dmsg0(150, "Error from write volume label.\n"); Leave(100);