Skip to content

Commit

Permalink
Add restic stats command (#259)
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepikaDixit committed Sep 5, 2019
1 parent e5dfd1e commit bac09fd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/restic/restic.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit bac09fd

Please sign in to comment.