Add restic stats command
@@ -119,6 +119,14 @@ func PruneCommand(profile *param.Profile, repository, encryptionKey string) []st
return shCommand(command)
}
+// StatsCommandByID returns restic stats command
+func StatsCommandByID(profile *param.Profile, repository, id, encryptionKey string) []string {
+ cmd := resticArgs(profile, repository, encryptionKey)
+ cmd = append(cmd, "stats", id)
+ command := strings.Join(cmd, " ")
+ return shCommand(command)
+}
+
const (
ResticPassword = "RESTIC_PASSWORD"
ResticRepository = "RESTIC_REPOSITORY"
