Ubuntu Desktop Backup to Proxmox Backup Server
Customized Implementation, Automation, and Retention Guide
Table of Contents
- Environment Parameters
- Step 1: Install the Proxmox Backup Client
- Step 2: Provision the Cryptographic Encryption Key
- Step 3: Run an Initial Test Backup Manual Routine
- Step 4: Full Automation script with Cron
- Step 5: Verification & Mounting Operations
Environment Parameters
This deployment guide has been customized with the specific credentials and environment properties detailed below:
- PBS Server IP Address: 192.168.18.12
- Datastore Target ID: pbs-backupdisc2
- Authentication Username: root@pem
- Authentication Password: This1s)nly4Me2C
Step 1: Install the Proxmox Backup Client
Execute the following lines sequentially to configure the signing keys and target repositories for the desktop system:
# Download and map the package signature confirmation certificate
sudo wget https://enterprise.proxmox.com/debian/proxmox-release-noble.gpg \
-O /etc/apt/trusted.gpg.d/proxmox-release-noble.gpg
# Add the no-subscription client distribution target
echo "deb http://download.proxmox.com/debian/pbs-client noble pbs-no-subscription" | \
sudo tee /etc/apt/sources.list.d/pbs-client.list
Refresh your localized application package indexes and execute the client compilation package deployment:
sudo apt update
sudo apt install proxmox-backup-client -y
Step 2: Provision the Cryptographic Encryption Key
Client-side encryption safeguards data blocks prior to transferring across local networks. Run the command block below to configure a hard security wrapper file:
sudo mkdir -p /etc/proxmox-backup
sudo proxmox-backup-client key create \
/etc/proxmox-backup/encryption_key.enc --kdf none
Warning: CRITICAL ENCRYPTION REQUIREMENT If you lose the
encryption_key.encfile, you cannot read or restore any past backups under any circumstances. Duplicate this file immediately onto an independent physical flash drive or keep it safely secured inside a credential safe.
Step 3: Run an Initial Test Backup Manual Routine
Use the string structure beneath to run an explicit system verification run manually. This confirms that communication filters and firewalls permit seamless data routing between hosts:
export PBS_PASSWORD="This1s)nly4Me2C"
sudo -E proxmox-backup-client backup root.pxar:/ \
--repository root@pem@192.168.18.12:pbs-backupdisc2 \
--keyfile /etc/proxmox-backup/encryption_key.enc \
--exclude /home/*/.cache \
--exclude /tmp \
--exclude /run \
--exclude /sys \
--exclude /proc
Step 4: Full Automation script with Cron
To eliminate manual intervention and handle hidden passwords securely, wrap the configurations cleanly into a persistent local system administrative shell script.
Create and Write the Production Script
Open a terminal text modifier to format the automation script:
sudo nano /usr/local/bin/pbs-backup.sh
Copy and write the exact code blocks provided below directly into that document file:
#!/bin/bash
set -e
# Configured Target Parameters
export PBS_REPOSITORY="root@pem@192.168.18.12:pbs-backupdisc2"
export PBS_PASSWORD="This1s)nly4Me2C"
export PBS_ENCRYPTION_KEY_FILE="/etc/proxmox-backup/encryption_key.enc"
# Binary Executable Absolute Path
CLIENT_BIN="/usr/bin/proxmox-backup-client"
echo "=== Starting Proxmox Backup Sequence: $(date) ==="
$CLIENT_BIN backup root.pxar:/ \
--exclude /proc \
--exclude /sys \
--exclude /dev \
--exclude /run \
--exclude /tmp \
--exclude /var/tmp \
--exclude /lost+found \
--exclude /home/*/.cache \
--exclude /home/*/.local/share/Trash
echo "=== Pruning Obsolete Snapshots ==="
# Retention strategy configuration: 7 daily, 4 weekly, 12 monthly logs
$CLIENT_BIN prune backup root.pxar \
--keep-daily 7 \
--keep-weekly 4 \
--keep-monthly 12
echo "=== Backup Process Complete: $(date) ==="
Apply Strict System Permissions
Restrict standard user access permissions completely so unprivileged accounts cannot inspect or query the configuration script:
sudo chmod 700 /usr/local/bin/pbs-backup.sh
sudo chown root:root /usr/local/bin/pbs-backup.sh
Insert Entry to Root Crontab
Access the central root schedule console via the following terminal utility string:
sudo crontab -e
Paste the following line exactly at the very bottom of the file to set the scheduled execution for 02:30 AM every calendar day:
30 2 * * * /usr/local/bin/pbs-backup.sh >> /var/log/proxmox-backup.log 2>&1
Step 5: Verification & Mounting Operations
To read the existing historical list of all compiled backup runs preserved safely on your target data machine, use this query command:
export PBS_PASSWORD="This1s)nly4Me2C"
sudo -E proxmox-backup-client snapshot list \
--repository root@pem@192.168.18.12:pbs-backupdisc2
Restore a Targeted Subfolder File
To restore individual elements without committing to a full-drive wipe recovery layout, create an arbitrary partition node and mount the remote snapshot array:
sudo mkdir -p /mnt/recovery
export PBS_PASSWORD="This1s)nly4Me2C"
# Example showing how to target a mount partition layout
# (adjust snapshot date string as shown in snapshot list command)
sudo -E proxmox-backup-client mount \
host/ubuntu-desktop/2026-05-27T02:30:00Z root.pxar /mnt/recovery/ \
--keyfile /etc/proxmox-backup/encryption_key.enc
When files are cleanly copied back over, drop the volume connection safely by triggering:
sudo umount /mnt/recovery/
Customized PBS Backup Guide — Ubuntu Desktop | 2026