This script automates the backup of Proxmox data to a designated Proxmox Backup Server (PBS).
- Proxmox Backup Client installed
- Configuration file located at
/etc/backup_pbs.conf
with necessary environment variables
-
Clone the repository and navigate to the project folder:
git clone https://github.com/highTowerSU/pbs-backup.git cd pbs-backup
-
Run the installation script to copy files to the appropriate locations:
sudo bash ./install.sh
This will:
- Copy the main script to
/usr/local/bin/backup_pbs.sh
- Copy the configuration file to
/etc/backup_pbs.conf
if it doesn't already exist.
- Copy the main script to
-
Edit the configuration file: Open
/etc/backup_pbs.conf
and set your Proxmox Backup Server details:PBS_PASSWORD='your_password_here' PBS_FINGERPRINT='your_fingerprint_here' PBS_REPOSITORY='user@server@hostname:backup' PBS_NS='your_namespace_here' PBS_ARCHIVES='root.pxar:/ c.pxar:/mnt/c/'
Run this command to download and execute the install script directly (options from install sh working):
sh -c "$(curl -fsSL https://raw.githubusercontent.com/highTowerSU/pbs-backup/main/webinstall.sh)"
Run the script manually or set it up as a cron job for regular automated backups.
# Manual run
/usr/local/bin/backup_pbs.sh
Add to cron:
30 23 * * * /usr/local/bin/backup_pbs.sh
If you're running this on WSL, you may want to exclude the following directories. To do so, create a file at /.pxarexclude
with the following content:
/proc/
/sys/
If the Proxmox Backup Client (proxmox-backup-client
) is not installed, run the following commands:
sudo apt update
sudo apt install proxmox-backup-client
If you encounter repository issues, create the file /etc/apt/sources.list.d/proxmox-backup-client.list
with the following content:
deb http://download.proxmox.com/debian/pbs bullseye main
Then update your package list again with:
sudo apt update