From 06bc456c51faa1dcb2a832acd8c97ff01bc58a2e Mon Sep 17 00:00:00 2001 From: Martin Date: Thu, 16 Jul 2020 21:19:18 +0200 Subject: [PATCH] Write/update shadow id --- urbackupclient/client.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/urbackupclient/client.cpp b/urbackupclient/client.cpp index 3aa099c5..5f9e8889 100644 --- a/urbackupclient/client.cpp +++ b/urbackupclient/client.cpp @@ -7373,6 +7373,26 @@ bool IndexThread::finishCbtEra(IFsFile* hdat_file, IFsFile* hdat_img, std::strin } } + if (hdat_img != NULL) + { + if (hdat_img->Write(0, reinterpret_cast(&shadow_id), sizeof(shadow_id)) != sizeof(shadow_id)) + { + VSSLog("Error writing shadow id", LL_ERROR); + return false; + } + + { + IScopedLock lock(cbt_shadow_id_mutex); + cbt_shadow_ids[strlower(volume)] = shadow_id; + } + } + + if (hdat_file != NULL) + { + IScopedLock lock(cbt_shadow_id_mutex); + ++index_hdat_sequence_ids[strlower(volume)]; + } + VSSLog("Zeroing file hash data of volume " + volume + "...", LL_DEBUG); #ifndef _WIN32