diff --git a/include/utilities/backupable_db.h b/include/utilities/backupable_db.h index abf05978c..0fc4ef69f 100644 --- a/include/utilities/backupable_db.h +++ b/include/utilities/backupable_db.h @@ -55,6 +55,8 @@ struct BackupableDBOptions { // Default: false bool destroy_old_data; + void Dump(Logger* logger) const; + explicit BackupableDBOptions(const std::string& _backup_dir, Env* _backup_env = nullptr, bool _share_table_files = true, diff --git a/utilities/backupable/backupable_db.cc b/utilities/backupable/backupable_db.cc index 422534470..f46000dfc 100644 --- a/utilities/backupable/backupable_db.cc +++ b/utilities/backupable/backupable_db.cc @@ -26,6 +26,15 @@ namespace rocksdb { +void BackupableDBOptions::Dump(Logger* logger) const { + Log(logger, " Options.backup_dir: %s", backup_dir.c_str()); + Log(logger, " Options.backup_env: %p", backup_env); + Log(logger, "Options.share_table_files: %d", share_table_files); + Log(logger, " Options.info_log: %p", info_log); + Log(logger, " Options.sync: %d", sync); + Log(logger, " Options.destroy_old_data: %d", destroy_old_data); +} + // -------- BackupEngineImpl class --------- class BackupEngineImpl : public BackupEngine { public: @@ -205,6 +214,8 @@ BackupEngineImpl::BackupEngineImpl(Env* db_env, backup_env_(options.backup_env != nullptr ? options.backup_env : db_env_) { + options_.Dump(options_.info_log); + // create all the dirs we need backup_env_->CreateDirIfMissing(GetAbsolutePath()); backup_env_->NewDirectory(GetAbsolutePath(), &backup_directory_);