@@ -0,0 +1,1675 @@
+package com.netflix.priam.cli;%0A%0Aimport java.util.Date;%0Aimport java.text.ParseException;%0A%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Aimport com.google.inject.Guice;%0Aimport com.google.inject.Injector;%0A%0Aimport com.netflix.priam.IConfiguration;%0Aimport com.netflix.priam.aws.S3FileSystem;%0Aimport com.netflix.priam.backup.Restore;%0Aimport com.netflix.priam.backup.AbstractBackupPath;%0A%0Apublic class Restorer%0A%7B%0A    private static final Logger logger = LoggerFactory.getLogger(Restorer.class);%0A%0A    static void displayHelp()%0A    %7B%0A        System.out.println(%22Usage: command_name FROM_DATE TO_DATE%22);%0A    %7D%0A%0A    public static void main(String%5B%5D args)%0A    %7B%0A        Injector injector = Guice.createInjector(new LightGuiceModule());%0A%0A        IConfiguration conf = injector.getInstance(IConfiguration.class);%0A        conf.intialize();%0A%0A        Date startTime, endTime;%0A        if (args.length %3C 2)%0A        %7B%0A            displayHelp();%0A            return;%0A        %7D%0A        try%0A        %7B%0A            AbstractBackupPath path = injector.getInstance(AbstractBackupPath.class);%0A            startTime = path.getFormat().parse(args%5B0%5D);%0A            endTime = path.getFormat().parse(args%5B1%5D);%0A        %7D catch (ParseException e)%0A        %7B%0A            logger.error(%22Unable to parse: %22, e);%0A            displayHelp();%0A            return;%0A        %7D%0A%0A        S3FileSystem fs = injector.getInstance(S3FileSystem.class);%0A        Restore restorer = injector.getInstance(Restore.class);%0A        try%0A        %7B%0A            restorer.restore(startTime, endTime);%0A        %7D catch (Exception e)%0A        %7B%0A            logger.error(%22Unable to restore: %22, e);%0A        %7D%0A        fs.shutdown();%0A    %7D%0A%7D

Add Restorer