code: public synchronized void restoreFromCheckpoint(CheckpointInputStream input) throws IOException {
      LOG.info("Restoring rocksdb from checkpoint");
      long startNano = System.nanoTime();
      Preconditions.checkState(input.getType() == CheckpointType.ROCKS,
          "Unexpected checkpoint type in RocksStore: " + input.getType());
      stopDb();
      FileUtils.deletePathRecursively(mDbPath);
      TarUtils.readTarGz(Paths.get(mDbPath), input);
      try {
        createDb();
      } catch (RocksDBException e) {
        throw new IOException(e);
      }
      LOG.info("Restored rocksdb checkpoint in {}ms",
          (System.nanoTime() - startNano) / Constants.MS_NANO);
    }
docs: Restores the database from a checkpoint.
  
  @param input the checkpoint stream to restore from