From 2077d886cce50a289bd730adff78886b13cfe5f8 Mon Sep 17 00:00:00 2001 From: adam Date: Mon, 12 Jan 2026 15:16:05 +0000 Subject: [PATCH] don't include snapshots in backup and don't set noheader (only works on incus) --- lxc-backup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lxc-backup.sh b/lxc-backup.sh index 126290d..9dbac53 100755 --- a/lxc-backup.sh +++ b/lxc-backup.sh @@ -42,7 +42,7 @@ lxc() { } list_vms() { - lxc list -c n -f csv,noheader + lxc list -c n -f csv } usage() { @@ -85,7 +85,7 @@ start_backup() { [[ -d "$destination" ]] || mkdir "$destination" [[ -f "${destination}/${backup_name}" ]] && { echo "Backup already exists"; return 2; } - lxc export "$vm" "${destination}/${backup_name}" || { echo "Error exporting $vm"; return 1; } + lxc export "$vm" --instance-only "${destination}/${backup_name}" || { echo "Error exporting $vm"; return 1; } [[ -n "$run_cleanup" ]] && prune_backups "$destination" }