@ -90,6 +90,7 @@ using rocksdb::LiveFileMetaData;
using rocksdb : : BackupEngine ;
using rocksdb : : BackupEngine ;
using rocksdb : : BackupableDBOptions ;
using rocksdb : : BackupableDBOptions ;
using rocksdb : : BackupInfo ;
using rocksdb : : BackupInfo ;
using rocksdb : : BackupID ;
using rocksdb : : RestoreOptions ;
using rocksdb : : RestoreOptions ;
using rocksdb : : CompactRangeOptions ;
using rocksdb : : CompactRangeOptions ;
using rocksdb : : RateLimiter ;
using rocksdb : : RateLimiter ;
@ -531,10 +532,18 @@ rocksdb_backup_engine_t* rocksdb_backup_engine_open(
}
}
void rocksdb_backup_engine_create_new_backup ( rocksdb_backup_engine_t * be ,
void rocksdb_backup_engine_create_new_backup ( rocksdb_backup_engine_t * be ,
rocksdb_t * db , char * * errptr ) {
rocksdb_t * db ,
char * * errptr ) {
SaveError ( errptr , be - > rep - > CreateNewBackup ( db - > rep ) ) ;
SaveError ( errptr , be - > rep - > CreateNewBackup ( db - > rep ) ) ;
}
}
void rocksdb_backup_engine_create_new_backup_flush ( rocksdb_backup_engine_t * be ,
rocksdb_t * db ,
unsigned char flush_before_backup ,
char * * errptr ) {
SaveError ( errptr , be - > rep - > CreateNewBackup ( db - > rep , flush_before_backup ) ) ;
}
void rocksdb_backup_engine_purge_old_backups ( rocksdb_backup_engine_t * be ,
void rocksdb_backup_engine_purge_old_backups ( rocksdb_backup_engine_t * be ,
uint32_t num_backups_to_keep ,
uint32_t num_backups_to_keep ,
char * * errptr ) {
char * * errptr ) {
@ -554,6 +563,12 @@ void rocksdb_restore_options_set_keep_log_files(rocksdb_restore_options_t* opt,
opt - > rep . keep_log_files = v ;
opt - > rep . keep_log_files = v ;
}
}
void rocksdb_backup_engine_verify_backup ( rocksdb_backup_engine_t * be ,
uint32_t backup_id , char * * errptr ) {
SaveError ( errptr , be - > rep - > VerifyBackup ( static_cast < BackupID > ( backup_id ) ) ) ;
}
void rocksdb_backup_engine_restore_db_from_latest_backup (
void rocksdb_backup_engine_restore_db_from_latest_backup (
rocksdb_backup_engine_t * be , const char * db_dir , const char * wal_dir ,
rocksdb_backup_engine_t * be , const char * db_dir , const char * wal_dir ,
const rocksdb_restore_options_t * restore_options , char * * errptr ) {
const rocksdb_restore_options_t * restore_options , char * * errptr ) {