Would it be possible to use xfsdump (or xfs_copy) to backup a running pve node root partition, which is xfs within a LV?
The reason:
I only have one PVE, so no cluster. I have all my containers backed up offsite to PBS.
But not backing up the PVE makes me a bit vulnerable. I've made all sorts of tweaks to networking, am storing some files on the PVE, etc.
The backup wouldn't need to be very often, maybe once per month.
For bonus points: is it then possible to upload the dump to the same PBS server?
Edit: I answered my own question, however the bonus points are still up for grabs!
The reason:
I only have one PVE, so no cluster. I have all my containers backed up offsite to PBS.
But not backing up the PVE makes me a bit vulnerable. I've made all sorts of tweaks to networking, am storing some files on the PVE, etc.
The backup wouldn't need to be very often, maybe once per month.
For bonus points: is it then possible to upload the dump to the same PBS server?
Edit: I answered my own question, however the bonus points are still up for grabs!
Bash:
#!/bin/bash
# Use xfsdump to backup the root pve fs
prefix="/var/lib/vz/snippets/"
mkdir -p "$prefix"
fn=$(date "+%Y%m%d_%H%M%S")_$(hostname)_pveroot.xfsdump
fp="$prefix$fn"
echo "XFS dumping / to $fp"
# Install the xfsdump package first
xfsdump -f "$fp" -L "$fn" -M "$fn" /
Last edited: