automatic auth for proxmox backup client

CAHEKs

Member
Nov 2, 2017
13
2
23
36
I have linux-based share and want backup it using pbs. Install proxmox backup client and use script :
proxmox-backup-client backup root.pxar:/data/Share --repository 10.0.62.80:files
It not working by crontab, because need root password.
I try add ssh key to backup server, but it not helped to me.
 
#PBS_PASSWORD=XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXXXXXXXX proxmox-backup-client backup root.pxar:/data/Share --repository root@pam!backtoken@10.0.62.80:files

Starting backup: host/vm-dc/2021-05-04T10:31:11Z
Client name: vm-dc-gub
Starting backup protocol: Tue May 4 17:31:11 2021
Error: backup owner check failed (root@pam!backtoken != root@pam)

Why I get this error?

For automatic auth I'd recommend using API tokens, they can be easily revoked and limited in privileges.
 
As you made already some backups in that group, and a token is a sub set of a user, you need to change that groups owner to the token you want to use.

That can be done in the web-interface, or with the client's change-owner command.
pbs-change-owner.png
 

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!