backups.restoreDbFromLatestBackup(getPath().toString(), getPath().toString(), restoreOptions);
/** * Restore the database from the latest backup * * @param dbDir The directory to restore the backup to, i.e. where your * database is * @param walDir The location of the log files for your database, often the * same as dbDir * @param restoreOptions Options for controlling the restore * * @throws RocksDBException thrown if the database could not be restored */ public void restoreDbFromLatestBackup( final String dbDir, final String walDir, final RestoreOptions restoreOptions) throws RocksDBException { assert (isOwningHandle()); restoreDbFromLatestBackup(nativeHandle_, dbDir, walDir, restoreOptions.nativeHandle_); }
if(backupInfo.size() > 0) { delete(); backupEngine.restoreDbFromLatestBackup(dbUri.getPath(), dbUri.getPath(), restoreOptions); backupEngine.purgeOldBackups(backupsToKeep); backupEngine.close();