class DbMigrator implements Migrator {

    @Override
    public List<Path> migrate(List<Path> srcPaths, Path destPath) throws IOException {
        List<Path> migratedDbsPaths = new ArrayList<>();
        DbInfo oldDbInfo = getOldDbInfo(srcPaths);
        if (oldDbInfo != null) {
            LOG.info("Found old db for migration at path {}", oldDbInfo.dbPath);
            int height = oldDbInfo.height;
            Path targetDbFullPath = dbInfoExtractor.getPath(destPath.toAbsolutePath().toString());
            LOG.info("Db {} has blocks - {}. Do migration to {}", oldDbInfo.dbPath, height, targetDbFullPath);

            Files.copy(oldDbInfo.dbPath, targetDbFullPath, StandardCopyOption.REPLACE_EXISTING);
            int actualDbHeight = dbInfoExtractor.getHeight(destPath.toAbsolutePath().toString());
            if (actualDbHeight != height) {
                throw new RuntimeException(String.format("Db was migrated with errors. Expected height - %d, actual - %d. Application restart is " +
                    "needed.", height, actualDbHeight));
            }
            migratedDbsPaths.add(oldDbInfo.dbDir);
        }
        return migratedDbsPaths;
    }

    public  DbMigrator(DbInfoExtractor dbInfoExtractor);

}