Skip to main content
Community Scripts logo
Skip to Content
Tools & Add-onsPVE Tools

PBS 4 Upgrade

Upgrade a Proxmox Backup Server 3 host to version 4 by switching the APT sources to Debian 13 and running a dist-upgrade.

pbs4-upgrade.sh takes a Proxmox Backup Server 3.x host (Debian 12 "Bookworm") to 4.x (Debian 13 "Trixie").

Website entry: pbs4-upgrade. Source: tools/pve/pbs4-upgrade.sh.

Run

In the shell of the Proxmox Backup Server 3 host, as root:

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/pbs4-upgrade.sh)"

The script exits with 232 if pveversion exists ("PVE Detected, Wrong Script!") and with 1 on ARM64.

Prompts

After the text prompt Start the Upgrade to Proxmox Backup Server 4 Script (y/n)? each step is a menu with yes and no. no skips that step only. Cancel or Esc ends the script.

Menu titleOn yes
PBS 3 BACKUPCreates pbs3-etc-backup-<date>.tar.gz with the contents of /etc/proxmox-backup in the directory you started the script from.
PBS 3 UPDATEapt-get update and apt-get -y dist-upgrade, to bring 3.x fully up to date first.
PBS 4 SOURCESDeletes /etc/apt/sources.list.d/*.list, removes lines containing proxmox or bookworm from /etc/apt/sources.list and writes /etc/apt/sources.list.d/debian.sources for trixie, trixie-security and trixie-updates (main contrib).
PBS4-ENTERPRISEWrites /etc/apt/sources.list.d/pbs-enterprise.sources, enabled. Choose this only with a subscription.
PBS4-NO-SUBSCRIPTIONWrites /etc/apt/sources.list.d/proxmox.sources with the pbs-no-subscription component.
PBS4 TESTWrites /etc/apt/sources.list.d/pbs-test.sources with every line commented out.
PBS 4 UPGRADEapt update, then DEBIAN_FRONTEND=noninteractive apt -o Dpkg::Options::="--force-confold" dist-upgrade -y.
REBOOTReboots the host.

Note the direction of the enterprise question: here yes adds the enterprise repository. In pbs3-upgrade yes disables it.

Environment variables

VariableDefaultPurpose
COMMUNITY_SCRIPTS_CORE_URLhttps://raw.githubusercontent.com/community-scripts/core/mainBase URL the script loads api/api.func from.

Limits

  • The script does not check the installed PBS version. Do not run it on a host that is already on 4.x.
  • No undo. The backup covers /etc/proxmox-backup only and stays on the same host; copy it elsewhere first.
  • PBS 4 SOURCES removes all .list files, including third-party repositories, without a backup.
  • If you answer no to both PBS4-ENTERPRISE and PBS4-NO-SUBSCRIPTION after switching the sources, no Proxmox repository is left and the upgrade step has no PBS 4 packages to install.
  • Afterwards, PBS Post Install can disable the enterprise repository and the subscription notice.