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

PBS Post Install

Set up package repositories, the subscription notice and updates on a Proxmox Backup Server 3 or 4 host.

post-pbs-install.sh is the Proxmox Backup Server counterpart of PVE Post Install. It corrects the Debian sources, sets up the PBS repositories, optionally removes the subscription notice, updates and reboots.

Website entry: post-pbs-install. Source: tools/pve/post-pbs-install.sh.

Run

In the Proxmox Backup Server shell, as root. Not on a Proxmox VE host: if pveversion exists the script prints "PVE Detected, Wrong Script!" and exits with 232.

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

Supported versions

The routine is chosen from VERSION_CODENAME in /etc/os-release:

CodenamePBSSources format
bookworm3.x.list files
trixie4.xdeb822 .sources files

Any other codename exits with 105. whiptail must be installed, otherwise the script exits with 127.

Prompts

The script starts with the text prompt Start the Proxmox Backup Server Post Install Script (y/n)?. Only the steps in this table ask a question; the repository steps below run without asking.

Menu titleChoicesEffect
PBS SOURCES (3.x)yesOverwrites /etc/apt/sources.list with the bookworm, bookworm-updates and bookworm-security entries (main contrib).
PBS SOURCES (4.x)yesDeletes /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-updates and trixie-security (main contrib non-free-firmware).
PBS Enterprise Repository (4.x, only if pbs-enterprise is present)yesSets Enabled: false in /etc/apt/sources.list.d/pbs-enterprise.sources.
noKeeps it active.
SUBSCRIPTION NAGyesWrites the APT hook /etc/apt/apt.conf.d/no-nag-script, which patches /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js after every package operation.
noDeletes /etc/apt/apt.conf.d/no-nag-script.
UPDATEyesapt update and apt -y dist-upgrade.
REBOOTyesReboots the host.

After the nag question the script reinstalls proxmox-widget-toolkit, which applies the patch or, without the hook, restores the original file.

Repository steps without a question

PBS 3.x

RepositoryFound activeFound disabledMissing
pbs-enterpriseCommented out in the file that contains itLeft alone/etc/apt/sources.list.d/pbs-enterprise.list is written with the entry commented out
pbs-no-subscriptionLeft aloneLeft alone/etc/apt/sources.list.d/pbs-install-repo.list is written, active
pbstestLeft aloneLeft alone/etc/apt/sources.list.d/pbstest-for-beta.list is written, commented out

PBS 4.x

RepositoryPresentMissing
pbs-enterpriseAsks (see above)/etc/apt/sources.list.d/pbs-enterprise.sources is written with Enabled: false
pbs-no-subscriptionLeft alone/etc/apt/sources.list.d/proxmox.sources is written, active
pbs-testLeft alone/etc/apt/sources.list.d/pbs-test.sources is written with Enabled: false

On ARM64 (dpkg --print-architecture returns arm64) all Proxmox repository steps are skipped; only the Debian sources, nag, update and reboot steps run.

Undo

  • Subscription notice: run the script again and answer no at SUBSCRIPTION NAG.
  • Repository files: no backup is made. Edit or delete the files named above.

Environment variables

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

Limits

  • Unlike the PVE script, an active pbs-enterprise repository on 3.x is disabled without asking.
  • The 4.x sources step deletes every .list file in /etc/apt/sources.list.d/, including third-party ones.
  • The script does not upgrade between major versions; see pbs3-upgrade and PBS 4 Upgrade.