live: use legacy backup image suffix

Image backup is considered a legacy feature. Use the legacy mechanism of
naming image backups by adding ".ant" suffix.

Previously, by using the strftime suffix clients were reporting that the
disk were getting full rather quickly.

When a good method for image deletion is implemented then a proper
backup naming mechanism should be reconsidered.
master v1.3.2
Jose M. Guisado 2023-10-24 09:56:09 +02:00
parent b49ec83bcd
commit 4e10c46563
1 changed files with 1 additions and 2 deletions

View File

@ -450,8 +450,7 @@ class OgLiveOperations:
logfile = open('/tmp/command.log', 'wb', 0)
if os.path.exists(image_path) and backup:
now = datetime.datetime.now().strftime("%Y_%m_%d_%H_%M_%S")
shutil.move(image_path, f'{image_path}_{now}')
shutil.move(image_path, f'{image_path}.ant')
p1 = Popen(cmd1, stdout=PIPE, stderr=logfile)
p2 = Popen(cmd2, stdin=p1.stdout)