all containers exept with a 0 at the and should be backed up
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user