Syntax for multiple repositories backups?

Nov 29, 2023
1
0
1
Proxmox hive mind,

I'm clearly doing something dumb syntactically here and need help. I'm trying to automate backups to two separate repositories and the syntax is tripping me up.

What currently happens is both backups end up on the "Documents" repository, but I want them separated instead.
e.g.: Upload directory '/mnt/Media' to 'REDACTED3@pbs@REDACTED1:8007:Documents' as Media.pxar.didx

Any help appreciated, it's probably simple :-/

Thanks.



Current client backup script:
Bash:
#Authentication Info
export PBS_REPOSITORY=REDACTED3@pbs@REDACTED1:Media
export PBS_PASSWORD=REDACTED2

#Clear Backup Specifications
SPEC=""

#Append Backup Media Share Spec
SPEC="$SPEC Media.pxar:/mnt/Media"


#Append Documents Share Spec
SPEC="$SPEC Documents.pxar:/mnt/Documents --repository REDACTED3@pbs@REDACTED1:Documents"

#Call Backup Client
echo SPEC is $SPEC
proxmox-backup-client backup $SPEC
 
Hi,
this will not work as you showed, as one single backup invocation is always related to the same datastore. You will have to split it into 2 separate commands: call proxmox-backup-client backup <SPEC> once for your default repo and once with the different specifications for the other repository.