@Override
  public Config loadConfig(OptionSet options) {
    Config config = super.loadConfig(options);
    if (options.has(newPathArgu)) {
      newPath = options.valueOf(newPathArgu);
      log.info("new state storage is " + newPath);
    }
    return config;
  }
Commandline tool to recover the state storage to a specified directory
samza-core/src/main/java/org/apache/samza/storage/StateStorageTool.java