The following was tested and passed under VirtualBox's VM.
Basic environment:
1. remote PBS-SERVER
2. VirtualBox VM is Ubuntu Desktop 24.04,upgraded from 22.04 to 23.10 to 24.04
Steps:
1. setup the Proxmox release key
2. Add pbs-client.list
Add the following line
3. Update
4. Install proxmox-backup-client
5. It is recommended to reboot once
6. Setting environment variables
Refer to https://pbs.proxmox.com/docs/backup-client.html#
7. Check the environment variables
PBS_REPOSITORY=user@pbs@myhostname:mydatastore
8, test the command line
--output----------------------------------------------------------------------------------------------------
Password for "user@pbs": ********
Starting backup: host/test-VirtualBox/2024-04-29T08:14:49Z
Client name: test-VirtualBox
Starting backup protocol: Mon Apr 29 08:14:55 2024
No previous manifest available.
Upload directory '/' to 'user@pbs@remoteIP:8007:mydatastore' as root.pxar.didx
skipping mount point: "boot/efi"
skipping mount point: "dev"
skipping mount point: "proc"
skipping mount point: "run"
skipping mount point: "snap/bare/5"
skipping mount point: "snap/core20/1974"
skipping mount point: "snap/core20/2264"
skipping mount point: "snap/core22/1122"
skipping mount point: "snap/core22/858"
skipping mount point: "snap/firefox/2987"
skipping mount point: "snap/firmware-updater/127"
skipping mount point: "snap/gtk-common-themes/1535"
skipping mount point: "snap/snap-store/959"
skipping mount point: "snap/snapd/21184"
skipping mount point: "snap/snapd/21465"
skipping mount point: "snap/snapd-desktop-integration/157"
skipping mount point: "snap/snapd-desktop-integration/83"
skipping mount point: "sys"
warning: file size increased while reading: "var/log/syslog", file will be truncated!
root.pxar: had to backup 6.793 GiB of 9.212 GiB (compressed 4.101 GiB) in 1880.72s
root.pxar: average backup speed: 3.698 MiB/s
root.pxar: backup was done incrementally, reused 2.42 GiB (26.3%)
Uploaded backup catalog (4.214 MiB)
Duration: 1880.77s
End Time: Mon Apr 29 08:46:16 2024
--output-----end--------------------------------------------------------------------------------------------
You can see the backup just now in the remote PBS SERVER.
9, build shell
-------------------------------------
#!/bin/bash
export PBS_REPOSITORY=user@pbs@myhostname:mydatastore
proxmox-backup-client backup test.pxar:/
-------------------------------------
10. Add it to the crontab and run it once a day
0 5 * * * * /bin/sh /root/pbsc_backup.sh
Basic environment:
1. remote PBS-SERVER
2. VirtualBox VM is Ubuntu Desktop 24.04,upgraded from 22.04 to 23.10 to 24.04
Steps:
1. setup the Proxmox release key
# wget https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg
2. Add pbs-client.list
# vi /etc/apt/sources.list.d/pbs-client.list
Add the following line
deb [arch=amd64] http://download.proxmox.com/debian/pbs-client bookworm main
3. Update
# apt update
4. Install proxmox-backup-client
# apt install proxmox-backup-client
5. It is recommended to reboot once
# reboot
6. Setting environment variables
Refer to https://pbs.proxmox.com/docs/backup-client.html#
# export PBS_REPOSITORY=user@pbs@myhostname:mydatastore
7. Check the environment variables
# env | grep PBS
PBS_REPOSITORY=user@pbs@myhostname:mydatastore
8, test the command line
# proxmox-backup-client backup root.pxar:/
--output----------------------------------------------------------------------------------------------------
Password for "user@pbs": ********
Starting backup: host/test-VirtualBox/2024-04-29T08:14:49Z
Client name: test-VirtualBox
Starting backup protocol: Mon Apr 29 08:14:55 2024
No previous manifest available.
Upload directory '/' to 'user@pbs@remoteIP:8007:mydatastore' as root.pxar.didx
skipping mount point: "boot/efi"
skipping mount point: "dev"
skipping mount point: "proc"
skipping mount point: "run"
skipping mount point: "snap/bare/5"
skipping mount point: "snap/core20/1974"
skipping mount point: "snap/core20/2264"
skipping mount point: "snap/core22/1122"
skipping mount point: "snap/core22/858"
skipping mount point: "snap/firefox/2987"
skipping mount point: "snap/firmware-updater/127"
skipping mount point: "snap/gtk-common-themes/1535"
skipping mount point: "snap/snap-store/959"
skipping mount point: "snap/snapd/21184"
skipping mount point: "snap/snapd/21465"
skipping mount point: "snap/snapd-desktop-integration/157"
skipping mount point: "snap/snapd-desktop-integration/83"
skipping mount point: "sys"
warning: file size increased while reading: "var/log/syslog", file will be truncated!
root.pxar: had to backup 6.793 GiB of 9.212 GiB (compressed 4.101 GiB) in 1880.72s
root.pxar: average backup speed: 3.698 MiB/s
root.pxar: backup was done incrementally, reused 2.42 GiB (26.3%)
Uploaded backup catalog (4.214 MiB)
Duration: 1880.77s
End Time: Mon Apr 29 08:46:16 2024
--output-----end--------------------------------------------------------------------------------------------
You can see the backup just now in the remote PBS SERVER.
9, build shell
# vi pbsc_backup.sh
-------------------------------------
#!/bin/bash
export PBS_REPOSITORY=user@pbs@myhostname:mydatastore
proxmox-backup-client backup test.pxar:/
-------------------------------------
# chmod +x pbsc_backup.sh
# ./pbsc_backup.sh
10. Add it to the crontab and run it once a day
# crontab -e
0 5 * * * * /bin/sh /root/pbsc_backup.sh