Skip to content

Commit

Permalink
feat(backup): set transfers before uploading backed up data
Browse files Browse the repository at this point in the history
We need to explicitly set transfers before backup.
Otherwise, a backup running after restore would inherit
its transfers setting, which might not be desirable.
Future commits will also make this configurable
by a dedicated --transfers flag.
  • Loading branch information
Michal-Leszczynski committed Oct 8, 2024
1 parent 6096987 commit f62ecd4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/service/backup/worker_upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ func (w *worker) uploadHost(ctx context.Context, h hostInfo) error {
if err := w.setRateLimit(ctx, h); err != nil {
return errors.Wrap(err, "set rate limit")
}
if err := w.Client.RcloneSetTransfers(ctx, h.IP, h.Transfers); err != nil {
return errors.Wrapf(err, "set transfers on %s to %d", h.IP, h.Transfers)
}

dirs := w.hostSnapshotDirs(h)

Expand Down

0 comments on commit f62ecd4

Please sign in to comment.