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.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!