14 lines
307 B
Bash
Executable File
14 lines
307 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# https://linuxcontainers.org/incus/docs/main/howto/instances_backup/
|
|
#
|
|
|
|
#set -x
|
|
|
|
for CT in $(/usr/bin/incus list -c n -f compact,noheader status=RUNNING) ; do
|
|
DATE=$(date '+%Y-%m-%d %H:%M:%S')
|
|
echo "[${DATE}] incus snapshot $CT"
|
|
/usr/bin/incus snapshot $CT 2>&1 > /dev/null
|
|
done
|
|
|