Byteback Dynamic Excludes [Permalink]
26-09-2016 21:13 UTC
Bytemark make a decent backup tool here
It has a file
in which you can list directories to be excluded. This is great, but it would be more useful if I could identify this in
the directory in question. Byteback... doesn't do this.
So I did. :D
I threw together the following exceptionally simple bash script which achieves this.
if [[ $EUID -ne 0 ]]; then
echo "Need to be root" >&2
echo "Building dynamic exclude list..."
find / -name '.do_not_backup' | xargs dirname > /etc/byteback/excludes
echo "Merging static includes..."
cat /etc/byteback/excludes.merge >> /etc/byteback/excludes
echo "Running byteback..."
In order for this to work, you need to
in any directory, and that directory won't get backed up. You can continue using
as a static excludes list.
You just need to use this script instead of byteback-backup, and the
means it will take and pass on the arguments to the byteback-backup call.