don't include snapshots in backup and don't set noheader (only works on incus)
This commit is contained in:
1 parent
753060563f
commit
2077d886cc
1 file changed
+2
-2
+2
-2
@@ -42,7 +42,7 @@ lxc() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
list_vms() {
|
list_vms() {
|
||||||
lxc list -c n -f csv,noheader
|
lxc list -c n -f csv
|
||||||
}
|
}
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
@@ -85,7 +85,7 @@ start_backup() {
|
|||||||
[[ -d "$destination" ]] || mkdir "$destination"
|
[[ -d "$destination" ]] || mkdir "$destination"
|
||||||
[[ -f "${destination}/${backup_name}" ]] && { echo "Backup already exists"; return 2; }
|
[[ -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"
|
[[ -n "$run_cleanup" ]] && prune_backups "$destination"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user