mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
apps: BACKUP_CORE_ONLY was not set for pre-upgrade safety backups, resulting in unecessarily large pre-upgrade backups
This commit is contained in:
parent
576992899c
commit
07daa68770
1 changed files with 11 additions and 3 deletions
|
@ -707,9 +707,17 @@ def app_upgrade(
|
|||
safety_backup_name = f"{app_instance_name}-pre-upgrade2"
|
||||
other_safety_backup_name = f"{app_instance_name}-pre-upgrade1"
|
||||
|
||||
tweaked_backup_core_only = False
|
||||
if "BACKUP_CORE_ONLY" not in os.environ:
|
||||
tweaked_backup_core_only = True
|
||||
os.environ["BACKUP_CORE_ONLY"] = "1"
|
||||
try:
|
||||
backup_create(
|
||||
name=safety_backup_name, apps=[app_instance_name], system=None
|
||||
)
|
||||
finally:
|
||||
if tweaked_backup_core_only:
|
||||
del os.environ["BACKUP_CORE_ONLY"]
|
||||
|
||||
if safety_backup_name in backup_list()["archives"]:
|
||||
# if the backup suceeded, delete old safety backup to save space
|
||||
|
|
Loading…
Add table
Reference in a new issue