Skip to content

Commit

Permalink
Set RESTIC_PROGRESS_FPS in restic wrapper shell
Browse files Browse the repository at this point in the history
Set RESTIC_PROGRESS_FPS in restic wrapper shell
  • Loading branch information
Emruz Hossain authored Sep 27, 2021
2 parents 72b7352 + b098301 commit 163e786
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions pkg/restic/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ import (
)

const (
RESTIC_REPOSITORY = "RESTIC_REPOSITORY"
RESTIC_PASSWORD = "RESTIC_PASSWORD"
TMPDIR = "TMPDIR"
RESTIC_REPOSITORY = "RESTIC_REPOSITORY"
RESTIC_PASSWORD = "RESTIC_PASSWORD"
RESTIC_PROGRESS_FPS = "RESTIC_PROGRESS_FPS"
TMPDIR = "TMPDIR"

AWS_ACCESS_KEY_ID = "AWS_ACCESS_KEY_ID"
AWS_SECRET_ACCESS_KEY = "AWS_SECRET_ACCESS_KEY"
Expand Down Expand Up @@ -81,6 +82,10 @@ const (
)

func (w *ResticWrapper) setupEnv() error {
// Set progress report frequency.
// 0.016666 is for one report per minute.
// ref: https://restic.readthedocs.io/en/stable/manual_rest.html
w.sh.SetEnv(RESTIC_PROGRESS_FPS, "0.016666")

if v, err := ioutil.ReadFile(filepath.Join(w.config.SecretDir, RESTIC_PASSWORD)); err != nil {
return err
Expand Down

0 comments on commit 163e786

Please sign in to comment.