Revert "instead of cloning we stop containers now"
This reverts commit 517777f38f.
This commit is contained in:
@@ -23,9 +23,10 @@ fi
|
||||
#only backup container which doesn't contain a 0 at the endps
|
||||
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
|
||||
${lxccmd} start ${container}
|
||||
${lxccmd} copy ${container} ${container}-backup
|
||||
${lxccmd} export ${container}-backup ${backuppath}$(date +%Y_%m_%d)-lxc-${container}.tar.gz --instance-only --optimized-storage
|
||||
${lxccmd} config set ${container}-backup security.protection.delete false
|
||||
${lxccmd} delete ${container}-backup
|
||||
done
|
||||
|
||||
#housekeeping - keep last 14 days
|
||||
|
||||
Reference in New Issue
Block a user