Add the Proxmox release key
sudo wget https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg \
-O /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg
Add the PBS client repository
Create the file
sudo nano /etc/apt/sources.list.d/pbs-client.listAdd this line:
deb [arch=amd64] http://download.proxmox.com/debian/pbs-client bookworm main
Update package lists
sudo apt updateInstall the Proxmox Backup Client
sudo apt install proxmox-backup-clientGet a user in the pbs realm in the ui.
PBS>Access Control>Users
fred@pbs
PBS>Access Control>API Tokens
Select your user → create a token.
Example token ID: scripting_token
mark@pbs!scripting_token
write down the Token Secret (Token Password), it will not be shown again and you will need it.
node:8007
fred@pbs!scripting_token@node:8007:datastore_name
Button on the Main Dashboard
export PBS_REPOSITORY="fred@pbs!scripting_token@node:8007:datastore_name"
export PBS_PASSWORD=""
export PBS_FINGERPRINT=""
NAMESPACE="" # must be setup in ui in advance
BACKUP_ID="what exported backupset will be called in ui"
BACKUP_PATH="what you want to back up"
- Make script executable with sudo chmod +x script.sh
- Schedule it in cron or with systemd trigger