commit fbbc91780b637d13da8b3cb9c42b9b99f9c10c8c Author: adam Date: Thu Jan 8 12:36:49 2026 +0000 accept a comma separate list of VMs diff --git a/lxc-backup.sh b/lxc-backup.sh new file mode 100755 index 0000000..93d502a --- /dev/null +++ b/lxc-backup.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +lxc() { + _LXC="${TARGET:-lxc}" + command $_LXC "$@" +} + +lxc_list() { + lxc list -c n -f csv,noheader "$@" +} + +usage() { echo "Usage: ${0##*/} [-l vm1,vm2,...]"; exit 1; } + +main() { + while getopts ":l:" opt; do + case "${opt}" in + l) + IFS="," read -r -a LIMIT <<< "$OPTARG" + ;; + *) + usage + ;; + esac + done +} + +main "$@"