@ -26,6 +26,15 @@
namespace rocksdb {
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 ---------
// -------- BackupEngineImpl class ---------
class BackupEngineImpl : public BackupEngine {
class BackupEngineImpl : public BackupEngine {
public :
public :
@ -205,6 +214,8 @@ BackupEngineImpl::BackupEngineImpl(Env* db_env,
backup_env_ ( options . backup_env ! = nullptr ? options . backup_env
backup_env_ ( options . backup_env ! = nullptr ? options . backup_env
: db_env_ ) {
: db_env_ ) {
options_ . Dump ( options_ . info_log ) ;
// create all the dirs we need
// create all the dirs we need
backup_env_ - > CreateDirIfMissing ( GetAbsolutePath ( ) ) ;
backup_env_ - > CreateDirIfMissing ( GetAbsolutePath ( ) ) ;
backup_env_ - > NewDirectory ( GetAbsolutePath ( ) , & backup_directory_ ) ;
backup_env_ - > NewDirectory ( GetAbsolutePath ( ) , & backup_directory_ ) ;