From 76c61699eb06ba3716c92f990d38e2200830ce43 Mon Sep 17 00:00:00 2001 From: drwtsn32x Date: Wed, 11 Sep 2019 03:43:54 -0700 Subject: [PATCH 1/2] Improve logging during database recreation --- .../Library/Main/Operation/RecreateDatabaseHandler.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Duplicati/Library/Main/Operation/RecreateDatabaseHandler.cs b/Duplicati/Library/Main/Operation/RecreateDatabaseHandler.cs index c2b16ce50..5ec4e0f17 100644 --- a/Duplicati/Library/Main/Operation/RecreateDatabaseHandler.cs +++ b/Duplicati/Library/Main/Operation/RecreateDatabaseHandler.cs @@ -188,13 +188,18 @@ namespace Duplicati.Library.Main.Operation backend.WaitForComplete(restoredb, null); m_result.EndTime = DateTime.UtcNow; return; - } - + } + progress++; if (filelistWork.Count == 1 && m_options.RepairOnlyPaths) + { m_result.OperationProgressUpdater.UpdateProgress(0.5f); + } else + { m_result.OperationProgressUpdater.UpdateProgress(((float)progress / filelistWork.Count()) * (m_options.RepairOnlyPaths ? 1f : 0.2f)); + Logging.Log.WriteVerboseMessage(LOGTAG, "ProcessingFilelistVolumes", "Processing filelist volume {0} of {1}", progress, filelistWork.Count); + } using(var tmpfile = entry.TempFile) { @@ -341,6 +346,7 @@ namespace Duplicati.Library.Main.Operation progress++; m_result.OperationProgressUpdater.UpdateProgress((((float)progress / indexfiles.Count) * 0.5f) + 0.2f); + Logging.Log.WriteVerboseMessage(LOGTAG, "ProcessingIndexlistVolumes", "Processing indexlist volume {0} of {1}", progress, indexfiles.Count); using(var tmpfile = sf.TempFile) { @@ -456,6 +462,7 @@ namespace Duplicati.Library.Main.Operation progress++; m_result.OperationProgressUpdater.UpdateProgress((((float)progress / lst.Count) * 0.1f) + 0.7f + (i * 0.1f)); + Logging.Log.WriteVerboseMessage(LOGTAG, "ProcessingBlocklistVolumes", "Phase {0} of 3, processing blocklist volume {1} of {2}", (i + 1), progress, lst.Count); var volumeid = restoredb.GetRemoteVolumeID(sf.Name); From 4df61495c27c6f359bb9ccc9b811b808f2b5e4e7 Mon Sep 17 00:00:00 2001 From: drwtsn32x Date: Wed, 11 Sep 2019 17:52:57 -0700 Subject: [PATCH 2/2] change wording --- Duplicati/Library/Main/Operation/RecreateDatabaseHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Duplicati/Library/Main/Operation/RecreateDatabaseHandler.cs b/Duplicati/Library/Main/Operation/RecreateDatabaseHandler.cs index 5ec4e0f17..0bb367027 100644 --- a/Duplicati/Library/Main/Operation/RecreateDatabaseHandler.cs +++ b/Duplicati/Library/Main/Operation/RecreateDatabaseHandler.cs @@ -462,7 +462,7 @@ namespace Duplicati.Library.Main.Operation progress++; m_result.OperationProgressUpdater.UpdateProgress((((float)progress / lst.Count) * 0.1f) + 0.7f + (i * 0.1f)); - Logging.Log.WriteVerboseMessage(LOGTAG, "ProcessingBlocklistVolumes", "Phase {0} of 3, processing blocklist volume {1} of {2}", (i + 1), progress, lst.Count); + Logging.Log.WriteVerboseMessage(LOGTAG, "ProcessingBlocklistVolumes", "Pass {0} of 3, processing blocklist volume {1} of {2}", (i + 1), progress, lst.Count); var volumeid = restoredb.GetRemoteVolumeID(sf.Name);