Skip to content

Commit

Permalink
Merge pull request #50 from sonroyaalmerol/remove-passthrough-proxy
Browse files Browse the repository at this point in the history
use prlimit to limit pbs client file handlers
  • Loading branch information
sonroyaalmerol authored Jan 11, 2025
2 parents bf7fe1a + 01c21ed commit b2353f9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/backend/backup/jobrun.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ func RunBackup(job *store.Job, storeInstance *store.Store) (*store.Task, error)
}

cmdArgs := []string{
"--nofile=1024:1024",
"/usr/bin/proxmox-backup-client",
"backup",
fmt.Sprintf("%s.pxar:%s", strings.ReplaceAll(job.Target, " ", "-"), srcPath),
"--repository",
Expand Down Expand Up @@ -189,7 +191,7 @@ func RunBackup(job *store.Job, storeInstance *store.Store) (*store.Task, error)

_ = FixDatastore(job, storeInstance)

cmd := exec.Command("/usr/bin/proxmox-backup-client", cmdArgs...)
cmd := exec.Command("/usr/bin/prlimit", cmdArgs...)
cmd.Env = os.Environ()
cmd.Env = append(cmd.Env, fmt.Sprintf("PBS_PASSWORD=%s", storeInstance.APIToken.Value))

Expand Down

0 comments on commit b2353f9

Please sign in to comment.