Priority Between Multiple Backup Storage Locations

nito

New Member
Apr 3, 2023
2
0
1
On my PVE I had 2 backup storage locations defined, pbs1 and pbs-offsite1 (which is a remote that syncs from pbs1). The reason for this configurations is for the case where the primary backup server was unavailable, or if backups had been deleted from it, they could still be restored from the offsite.

Backups were working fine on all nodes, until I migrated one VM from one node to another, and it's backups started failing with "error: backup owner check failed (root@pam!iti_backup != root@pam)". I tried a manual backup and it also failed. Then I realized pbs-offsite1 was being picked as the default backup location from both the manual backup and backup view drop downs. And for this migrated VM apparently it was also the one being used. After I did one manual backup on that VM to the right location, then the backup job fixed itself; do they defualt to the last backup location for each VM? I guess the only reason it was working fine is because I added the offsite location AFTER the main was already configured and working.

So this begs the question, is there a way to designate a default storage location when you have multiple defined (by the way I have also encounter a similar issue when having multiple VM storage locations and when you try to create a new VM the GUI defaults to the wrong one)? Funny enough, when I asked ChatGPT, it told me to add a line to the storage.cfg with "priority: 10" and "priority: 5" for the backup locations.
 
Hi,

that seems odd. Usually backup jobs should be associated with specific backup storage. Can you post the contents of the files /etc/pve/jobs.cfg and /etc/pve/storage.cfg from both nodes? These shouldn't differ between nodes, but just to be sure. Please also use [code][/code] when you post the contents of the files to preserve formatting.

Maybe you could also post the task log of the failing backup.

Funny enough, when I asked ChatGPT, it told me to add a line to the storage.cfg with "priority: 10" and "priority: 5" for the backup locations.
Yeah, this won't work :D
 
jobs.cfg:

Code:
vzdump: backup-b2b3cf97-916a
        schedule */4:00
        all 1
        enabled 1
        mailnotification failure
        mailto systememail@example.com
        mode snapshot
        notes-template {{guestname}}
        prune-backups keep-daily=15,keep-hourly=5,keep-last=1,keep-monthly=12,keep-weekly=10,keep-yearly=1
        storage pbs1-mox1

storage.cfg:

Code:
pbs: pbs1-mox1
        datastore ds1
        server pbs1
        content backup
        encryption-key <redacted>
        fingerprint <redacted>
        namespace Main/mox1
        prune-backups keep-all=1
        username root@pam!my_backup


pbs: pbs-offsite1-mox1
        disable
        datastore ds1
        server pbs-offsite1
        content backup
        encryption-key <redacted>
        fingerprint <redacted>
        namespace Main/mox1
        prune-backups keep-all=1
        username root@pam!my_backup

Like I said, the failure happened with only this one VM I migrated. And once I did one manual backup to the correct location, then the backup job stopped failing.

ChatGPT might made stuff up, but that is a pretty good feature request. There should be something like that for all storage location types, since it is not clear what gets picked as default in every GUI drop down selection list.
 
Last edited:
Like I said, the failure happened with only this one VM I migrated. And once I did one manual backup to the correct location, then the backup job stopped failing.
Can you post the task log of the original failed backup please? From the configs you can clearly see that the backup job is associated with the storage “pbs1-mox1”. So either there is some error in the way this property is handled or something else went wrong.

As for the manual backups, the order in the drop-downs should be alphabetical by name. So you could maybe try to rename the offsite storage to something like “pbs-mox1-offsite1” (by removing and re-adding the storage). I doubt it is the case from what you told me so far, but just in case: if that storage is used anywhere else in the cluster, renaming this storage may break stuff.

ChatGPT might made stuff up, but that is a pretty good feature request.
Sorry to tell you, but not “might”, it has :D

We do still prefer our feature request to be human-generated. If you want that feature, you can open a request over in our Bugzilla https://bugzilla.proxmox.com/.

Although, this feature may not be implemented. Such a priority setting would require additional logic on the front and backend to be handled properly and has no obvious benefit to an alphabetical order. Meaning, a use case where the order in those drop-downs needs to differ from the alphabetical order is probably rather obscure.
 

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!