better grep
This commit is contained in:
@@ -20,8 +20,8 @@ then
|
||||
exit 2
|
||||
fi
|
||||
|
||||
#containder without an backup ends with 0
|
||||
for container in $(${lxccmd} list --format csv -c n | grep -vE "0$|backup");
|
||||
#only backup container which contain a 1 at the end of the line
|
||||
for container in $(${lxccmd} list --format csv -c n | grep "1$");
|
||||
do
|
||||
${lxccmd} copy ${container} ${container}-backup
|
||||
${lxccmd} export ${container}-backup ${backuppath}$(date +%Y_%m_%d)-lxc-${container}.tar.gz --instance-only --optimized-storage
|
||||
|
||||
Reference in New Issue
Block a user