Made system-wide installation more discoverable and automatic.
CHANGES:
1. Main Menu Option 7 Added:
- New option: "Install as system command"
- Renumbered Exit from 7 to 8
- Updated prompt from [1-7] to [1-8]
- Calls install_script() directly from menu
2. Post-Installation Prompt:
- After initial target configuration completes, asks:
"Would you like to install PBSClientTool as a system command?"
- Shows benefit: "This will allow you to run 'sudo PBSClientTool' from anywhere."
- Default: yes (recommended)
- Only prompts if not already installed (checks $INSTALL_PATH)
- Applied to both setup paths:
- PBS client already installed (first target setup)
- PBS client not installed (fresh install)
3. Installation Detection:
- Checks if /usr/local/bin/PBSClientTool already exists
- Skips prompt if already installed
- Prevents redundant installation offers
USER EXPERIENCE:
Before:
- Users had to know about --install flag
- Manual installation required navigating to script directory
- No guidance after setup
After:
- Automatic prompt after initial setup (smart default)
- Menu option for installation anytime
- Clear explanation of benefits
- One-time setup, use anywhere
Example flow:
1. User runs: sudo ./pbs-client-installer.sh
2. Completes initial configuration wizard
3. Script shows: "First target 'default' created successfully!"
4. Script asks: "Install as system command? (yes/no) [yes]:"
5. User presses Enter (accepts default)
6. Installed to /usr/local/bin/PBSClientTool
7. User can now run: sudo PBSClientTool (from any directory)
This makes system installation the default path for new users,
improving discoverability and ease of use.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
||
|---|---|---|
| CHANGELOG.md | ||
| pbs-client-installer.sh | ||
| pbs-client-uninstaller.sh | ||
| quickstart.md | ||
| README.md | ||
| test-connection.sh | ||
| TROUBLESHOOTING.md | ||
PBSClientTool
Interactive tool for installing and managing Proxmox Backup Client on Ubuntu, Debian, and Arch Linux.
Features
- Multi-target backups - Backup to multiple PBS servers for redundancy
- Auto-detection - Automatically detects your Linux distribution
- File & block device backups - Supports .pxar (files) and .img (full disk) backups
- Interactive setup - Guided configuration with connection testing
- Flexible scheduling - Separate schedules for file and disk backups
- System-wide install - Run from anywhere with
PBSClientToolcommand
Quick Start
# Clone and install
git clone https://github.com/zaphod-black/PBSClientTool.git
cd PBSClientTool
sudo ./pbs-client-installer.sh --install
# Run from anywhere
sudo PBSClientTool
Prerequisites
On Your System
- Root/sudo access
- Internet connection
- Supported OS: Ubuntu 20.04+, Debian 10+, Arch Linux
- Arch only: Install
yayfirst (instructions)
On Proxmox Backup Server
Before running the installer, set up an API token with backup permissions:
1. Create API Token:
- Login to PBS web interface (e.g.,
https://192.168.1.181:8007) - Go to Configuration → Access Control → API Tokens
- Click Add
- Configure:
- User:
root@pam - Token ID:
backupAutomations(or any name) - Privilege Separation: Leave unchecked
- User:
- Copy the secret immediately (shown only once!)
2. Grant Permissions:
- Go to Configuration → Access Control → Permissions
- Click Add → User Permission
- Configure:
- Path:
/datastore/YOUR-DATASTORE-NAME - User:
root@pam!backupAutomations - Role:
DatastoreBackup
- Path:
- Click Add
Usage
Installation Wizard
Run the tool and follow the prompts:
sudo PBSClientTool
You'll be asked for:
- PBS Server: IP/hostname and port
- Authentication: API token (recommended) or password
- Backup Type:
- File-level only (fast, selective restore)
- Block device only (full disk image, bootable as VM)
- Both (recommended) - Files daily + disk weekly
- Schedule: When to run backups
- Retention: How long to keep backups
- Encryption: Optional (recommended for sensitive data)
The installer will test your connection and create automated backup services.
Multi-Target Management
After installation, you can manage multiple backup targets:
Main Menu Options:
- List all backup targets - View all configured servers
- Add new backup target - Configure additional PBS server
- Edit existing target - Update connection/settings
- Delete target - Remove a backup destination
- Run backup now - Test or run immediate backup
- Reinstall PBS client - Reinstall the backup software
- Exit
Running Backups
Scheduled (automatic):
# Check timer status
sudo systemctl status pbs-backup-default.timer
# View next scheduled run
sudo systemctl list-timers pbs-backup-*
Manual (on-demand):
# Via menu (recommended - shows live progress)
sudo PBSClientTool
# Select option 5 (Run backup now)
# Via systemd
sudo systemctl start pbs-backup-default-manual.service
# Direct script execution
sudo /etc/proxmox-backup-client/backup-default.sh
Viewing Logs
# View recent backup logs
sudo journalctl -u pbs-backup-default.service -n 50
# Follow logs in real-time
sudo journalctl -fu pbs-backup-default.service
# List all backups on server
sudo -E proxmox-backup-client snapshot list
Command-Line Options
sudo PBSClientTool # Interactive menu
sudo PBSClientTool --help # Show help
sudo PBSClientTool --version # Show version
sudo PBSClientTool --install # Install to system
sudo PBSClientTool --uninstall # Remove from system
Configuration Files
Multi-target setup:
/etc/proxmox-backup-client/targets/TARGET.conf- Target configurations/etc/proxmox-backup-client/backup-TARGET.sh- Backup scripts/etc/systemd/system/pbs-backup-TARGET.{service,timer}- Systemd units
Encryption key:
/root/.config/proxmox-backup/encryption-key.json- Main key/root/pbs-encryption-key-*.txt- Paper backup (print and secure!)
Backup Types Explained
File-Level (.pxar)
- Fast - Usually completes in 2-5 minutes
- Selective - Restore individual files/folders
- Efficient - Deduplication and compression
- Best for: Daily backups, quick recovery
Block Device (.img)
- Slow - Can take 20-30+ minutes
- Complete - Entire disk image
- Bootable - Can restore as VM on Proxmox
- Best for: Weekly backups, disaster recovery
Hybrid (Both)
- Recommended - Best of both worlds
- Files backup daily (fast, efficient)
- Disk image weekly (complete system backup)
- Configure separate schedules for each
Encryption Key - Important!
⚠️ Your encryption key is the ONLY way to restore encrypted backups!
If you lose the key, your backups are permanently unrecoverable.
Best practices:
- Print the paper backup immediately (
/root/pbs-encryption-key-*.txt) - Store printed copy in safe location (fireproof safe, safety deposit box)
- Copy
encryption-key.jsonto password manager - NEVER store key on the same system being backed up
- Test key restoration regularly
Updating PBSClientTool
cd ~/dev/PBSClientTool
git pull
sudo ./pbs-client-installer.sh --install
# Confirm overwrite: yes
Your backup targets and configurations are preserved during updates.
Uninstallation
Remove command only (keeps backups and configs):
sudo PBSClientTool --uninstall
Complete removal (removes everything):
cd ~/dev/PBSClientTool
sudo ./uninstaller.sh
Troubleshooting
Having issues? See the Troubleshooting Guide for:
- Connection test failures
- Permission errors
- Installation issues
- Backup problems
- Configuration issues
- And more...
Supported Distributions
| OS | Versions | Notes |
|---|---|---|
| Ubuntu | 20.04, 22.04, 24.04 | LTS only |
| Debian | 10, 11, 12 | Stable |
| Arch Linux | Rolling | Requires yay |
Getting Help
- Script issues: GitHub Issues
- PBS questions: Proxmox Forum
- PBS docs: Official Documentation
Contributing
Issues and pull requests welcome!
License
MIT License
Credits
Created by Cade - Built on Proxmox Backup Client