public static void main(String[] args) {
    StateStorageTool tool = new StateStorageTool();
    OptionSet options = tool.parser().parse(args);
    Config config = tool.loadConfig(options);
    String path = tool.getPath();

    StorageRecovery storageRecovery = new StorageRecovery(config, path);
    storageRecovery.run();
  }
Commandline tool to recover the state storage to a specified directory
samza-core/src/main/java/org/apache/samza/storage/StateStorageTool.java