Skip to content

upstairs-at-erics/generic-proxmox-backup-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Generic Proxmox Backup Script (Ubuntu24.04)

Install Proxmox Backup Client on Ubuntu 24.04

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.list

Add this line:

deb [arch=amd64] http://download.proxmox.com/debian/pbs-client bookworm main

Update package lists

sudo apt update

Install the Proxmox Backup Client

sudo apt install proxmox-backup-client

Get Proxmox Backup Client Keys

User:

Get a user in the pbs realm in the ui.
PBS>Access Control>Users

fred@pbs

Token ID:

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.

Hostname & Port:

node:8007

Full Repository Value:

fred@pbs!scripting_token@node:8007:datastore_name

Copy the PBS fingerprint

Button on the Main Dashboard

Change the values in the script

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"

Next Steps

  • Make script executable with sudo chmod +x script.sh
  • Schedule it in cron or with systemd trigger

License

MIT

About

A generic linux script for PBS. Backup file-system folders on VPS hosts to remote PBS, using tailscale VPN.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages