bundlewrap/bundles/backup/files/backup_path

16 lines
244 B
Bash

#!/bin/bash
set -exu
path=$1
if zfs list -H -o mountpoint | grep -q "^$path$"
then
/opt/backup/backup_path_via_zfs "$path"
elif test -e "$path"
then
/opt/backup/backup_path_via_rsync "$path"
else
echo "UNKNOWN PATH: $path"
exit 1
fi