diff --git a/lxc_backup.sh b/lxc_backup.sh index 1124b84..cf1fa54 100755 --- a/lxc_backup.sh +++ b/lxc_backup.sh @@ -20,8 +20,8 @@ then exit 2 fi -#only backup container which contain a 1 at the end of the line -for container in $(${lxccmd} list --format csv -c n | grep "1$"); +#only backup container which doesn't contain a 0 at the end +for container in $(${lxccmd} list --format csv -c n | grep -v "0$"); do ${lxccmd} stop ${container} ${lxccmd} export ${container} ${backuppath}$(date +%Y_%m_%d)-lxc-${container}.tar.gz --instance-only