From 3dd2a6ef2e13f4e21b96b6cf5dc83b3afc1fe604 Mon Sep 17 00:00:00 2001 From: Igor Solodovnikov Date: Sun, 14 Feb 2021 21:13:10 +0200 Subject: [PATCH] PSMDB-810 log more info during hot backup --- src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp index 6ca20801c13c5..e502019a5f720 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp @@ -2064,11 +2064,20 @@ Status WiredTigerKVEngine::hotBackup(OperationContext* opCtx, const std::string& std::set existDirs{destPath}; // Do copy files + int fcCtr = 0; for (auto&& file : filesList) { fs::path srcFile{std::get<0>(file)}; fs::path destFile{std::get<1>(file)}; auto fsize{std::get<2>(file)}; + log() << "Beginning copy of {}/{} files in backup snapshot: {}, {} bytes"_format( + ++fcCtr, filesList.size(), srcFile.string(), fsize); + if (!fs::exists(srcFile)) { + log() << "Source file does not exist: {}"_format(srcFile.string()); + } else { + log() << "Source file size is: {} bytes"_format(fs::file_size(srcFile)); + } + try { // Try creating destination directories if needed. const fs::path destDir(destFile.parent_path());