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
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#only backup container which contain a 1 at the end of the line
|
#only backup container which doesn't contain a 0 at the end
|
||||||
for container in $(${lxccmd} list --format csv -c n | grep "1$");
|
for container in $(${lxccmd} list --format csv -c n | grep -v "0$");
|
||||||
do
|
do
|
||||||
${lxccmd} stop ${container}
|
${lxccmd} stop ${container}
|
||||||
${lxccmd} export ${container} ${backuppath}$(date +%Y_%m_%d)-lxc-${container}.tar.gz --instance-only
|
${lxccmd} export ${container} ${backuppath}$(date +%Y_%m_%d)-lxc-${container}.tar.gz --instance-only
|
||||||
|
|||||||
Reference in New Issue
Block a user