Scheduling proxmox-backup-client

NethServer Version: 7.9.2009
Module: your_module
Hi,
i am just evaluating proxmox backup server and I am really impressed. It works as a really god together whit proxmox VE.

But now i am trying to schedule client-file backups. I have installe the proxmox backup client on a Nethserver test VM ( After recipe from HTTPS://GitHub - sg4r/proxmox-backup-client: CentOS 7 Client for Proxmox Backup Server). And that works all super.

I have add this to the .bashrc file, so I don’t need to login.

.bashrc

User specific aliases and functions

alias rm=‘rm -i’
alias cp=‘cp -i’
alias mv=‘mv -i’

export PBS_PASSWORD=PASSWORD
export PBS_REPOSITORY=root@pam@SERVER_IP:Data_STORE

Source global definitions

if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
source “$HOME/.cargo/env”

I can backup from CLI, with this command line proxmox-backup-client backup all.pxar:/ --repository root@pam@SERVER_IP:Data. But if I try to run it via a cron job it fails, with this error message:

Error: error building client for repository root@pam@SERVER_IP:8007:Data - no password input mechanism available

But if I run if from the command line first, and there after run a cron job. The cron job works ??

Are there any others who have made this a success. and who can help me in the right direction
Thanks in advance for that feedback.

Michael

Does this help: https://pbs.proxmox.com/docs/backup-client.html?highlight=PBS_PASSWORD

Hi robb

Nop.I have try thate :sob:

Cron may have a different console context than your user shell so it might not recognize the environment variables set externally to the script.

Some help:

Hi

I try to make a script, like the one from the Proxmox forum.

export PBS_PASSWORD=xxxxxxx
export PBS_REPOSITORY=root@pam@xxx.xxx.xxx.xxx:Data
proxmox-backup-client backup all.pxar:/
export PBS_PASSWORD=
export PBS_REPOSITORY=
But i get this error, if i try to run it from the console:
PBS1

So i try to make a cron job, and here i got this error:
PBS2

Then i try to change the command line “proxmox-backup-client backup all.pxar:/” to /usr/local/bin/proxmox-backup-client backup all.pxar:/ in the script file. And then try to run a new cron job. again an error occurred, this time is was:
PBS3

so no luck :cry: