[perf] Fix perf-tool restore funcs.

Change-Id: I7e30c93993de30d57342f918d3e970b7525f246d
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/303800
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
diff --git a/perf/configs/cdb-flutter.json b/perf/configs/cdb-flutter.json
index 0800208..4a51b61 100644
--- a/perf/configs/cdb-flutter.json
+++ b/perf/configs/cdb-flutter.json
@@ -22,7 +22,7 @@
   },
   "git_repo_config": {
     "url": "https://github.com/flutter/engine",
-    "dir": "/tmp/repo",
+    "dir": "/tmp/flutter-engine",
     "debounce_commit_url": false,
     "commit_url": "%s/commit/%s"
   }
diff --git a/perf/configs/flutter.json b/perf/configs/flutter.json
index 801f649..ed48a2a 100644
--- a/perf/configs/flutter.json
+++ b/perf/configs/flutter.json
@@ -22,7 +22,7 @@
   },
   "git_repo_config": {
     "url": "https://github.com/flutter/engine",
-    "dir": "/tmp/repo",
+    "dir": "/tmp/flutter-engine",
     "debounce_commit_url": false,
     "commit_url": "%s/commit/%s"
   }
diff --git a/perf/go/perf-tool/main.go b/perf/go/perf-tool/main.go
index f585894..2d9aafc 100644
--- a/perf/go/perf-tool/main.go
+++ b/perf/go/perf-tool/main.go
@@ -90,6 +90,7 @@
 			if err != nil {
 				return skerr.Wrap(err)
 			}
+			config.Config = instanceConfig
 
 			return nil
 		},
@@ -394,7 +395,7 @@
 		backupToDate = time.Now().Add(-time.Hour * 24 * 7 * 4)
 	} else {
 		var err error
-		backupToDate, err = time.Parse("2006-01-02", backupToDateFlag)
+		backupToDate, err = time.Parse("2006-01-02", c.Flag(backupToDateFlag).Value.String())
 		if err != nil {
 			return err
 		}
@@ -418,7 +419,7 @@
 	if err != nil {
 		return err
 	}
-	cidl := cid.New(ctx, perfGit, config.Config)
+	cidl := cid.New(ctx, perfGit, instanceConfig)
 	regressionStore, err := builders.NewRegressionStoreFromConfig(ctx, true, cidl, instanceConfig)
 	if err != nil {
 		return err
@@ -477,10 +478,9 @@
 // findFileInZip finds and opens a file within a .zip archive and returns the
 // io.ReadCloser for it.
 func findFileInZip(filename string, z *zip.ReadCloser) (io.ReadCloser, error) {
-	// Find "alerts"
 	var zipFile *zip.File
 	for _, zipReader := range z.File {
-		if zipReader.Name == "alerts" {
+		if zipReader.Name == filename {
 			zipFile = zipReader
 		}
 	}
@@ -605,7 +605,7 @@
 	if err != nil {
 		return err
 	}
-	cidl := cid.New(ctx, perfGit, config.Config)
+	cidl := cid.New(ctx, perfGit, instanceConfig)
 	regressionStore, err := builders.NewRegressionStoreFromConfig(ctx, true, cidl, instanceConfig)
 	if err != nil {
 		return err