instead of cloning we stop containers now
cause with big containers we need way to much diskspace for clones. also the backup job runs at night were no one uses these containers so they can be stopped without a problem
This commit is contained in:
@@ -23,9 +23,9 @@ fi
|
|||||||
#only backup container which contain a 1 at the end of the line
|
#only backup container which contain a 1 at the end of the line
|
||||||
for container in $(${lxccmd} list --format csv -c n | grep "1$");
|
for container in $(${lxccmd} list --format csv -c n | grep "1$");
|
||||||
do
|
do
|
||||||
${lxccmd} copy ${container} ${container}-backup
|
${lxccmd} stop ${container}
|
||||||
${lxccmd} export ${container}-backup ${backuppath}$(date +%Y_%m_%d)-lxc-${container}.tar.gz --instance-only --optimized-storage
|
${lxccmd} export ${container} ${backuppath}$(date +%Y_%m_%d)-lxc-${container}.tar.gz --instance-only --optimized-storage
|
||||||
${lxccmd} delete ${container}-backup
|
${lxccmd} start ${container}
|
||||||
done
|
done
|
||||||
|
|
||||||
#housekeeping - keep last 14 days
|
#housekeeping - keep last 14 days
|
||||||
|
|||||||
Reference in New Issue
Block a user