Skip to content

Commit

Permalink
force namespace if agent by default
Browse files Browse the repository at this point in the history
  • Loading branch information
sonroyaalmerol committed Nov 12, 2024
1 parent 7ae12b1 commit 352a120
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/backend/backup/fix_datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ func FixDatastore(job *store.Job, storeInstance *store.Store) error {
if job.Namespace != "" {
cmdArgs = append(cmdArgs, "--ns")
cmdArgs = append(cmdArgs, job.Namespace)
} else if isAgent && job.Namespace == "" {
cmdArgs = append(cmdArgs, "--ns")
cmdArgs = append(cmdArgs, strings.ReplaceAll(job.Target, " - ", "/"))
}

cmd := exec.Command("/usr/bin/proxmox-backup-client", cmdArgs...)
Expand Down
3 changes: 3 additions & 0 deletions internal/backend/backup/jobrun.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ func RunBackup(job *store.Job, storeInstance *store.Store) (*store.Task, error)
if job.Namespace != "" {
cmdArgs = append(cmdArgs, "--ns")
cmdArgs = append(cmdArgs, job.Namespace)
} else if isAgent && job.Namespace == "" {
cmdArgs = append(cmdArgs, "--ns")
cmdArgs = append(cmdArgs, strings.ReplaceAll(job.Target, " - ", "/"))
}

cmd := exec.Command("/usr/bin/proxmox-backup-client", cmdArgs...)
Expand Down

0 comments on commit 352a120

Please sign in to comment.