public RocksDBBackupInfo backupDB(final String backupDBPath) throws IOException {
        final Timer.Context timeCtx = getTimeContext("BACKUP_DB");
        FileUtils.forceMkdir(new File(backupDBPath));
        final Lock writeLock = this.readWriteLock.writeLock();
        writeLock.lock();
        try (final BackupEngineOptions backupOpts = createBackupDBOptions(backupDBPath);
             final BackupEngine backupEngine = BackupEngine.open(this.options.getEnv(), backupOpts)) {
            backupEngine.createNewBackup(this.db, true);
            final List<BackupInfo> backupInfoList = backupEngine.getBackupInfo();
            if (backupInfoList.isEmpty()) {
                LOG.warn("Fail to backup at {}, empty backup info.", backupDBPath);
                return null;
            }
            // chose the backupInfo who has max backupId
            final BackupInfo backupInfo = Collections.max(backupInfoList, Comparator.comparingInt(BackupInfo::backupId));
            final RocksDBBackupInfo rocksBackupInfo = new RocksDBBackupInfo(backupInfo);
            LOG.info("Backup rocksDB into {} with backupInfo {}.", backupDBPath, rocksBackupInfo);
            return rocksBackupInfo;
        } catch (final RocksDBException e) {
            throw new StorageException("Fail to backup at path: " + backupDBPath, e);
        } finally {
            writeLock.unlock();
            timeCtx.stop();
        }
    }
Local KV store based on RocksDB

@author dennis
@author jiachun.fjc
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/storage/RocksRawKVStore.java